hotakey
by
pacochi
2017-11-17 [2017/11/17 15:29:03]
https://mstdn.maud.io/@unarist/8112378
-
/*
* @title hotakey
* @description https://mstdn.maud.io/@unarist/8112378
* @include https://mstdn.maud.io/web/*
* @license MIT License
* @javascript_url
* @private
*/
((d = document, b = d.body, p) => b.addEventListener('contextmenu', e => {
if (d.querySelector('.run-akane')) return true;
p = b.appendChild(Object.assign(d.createElement('img'), {
className: 'run-akane',
style: 'position: absolute; right: -400px; bottom: 0; transition: all 10s; z-index: 2147483646;'
}));
p.addEventListener('load', e => (p.style.right = (d.documentElement.clientWidth + 400) + 'px'), false);
p.addEventListener('transitionend', e => b.removeChild(p), false);
p.src = 'https://hen.acho.co/files/hotakey.png';
e.preventDefault();
}, false))();
-
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。