Benutzer:Totto/common.js: Unterschied zwischen den Versionen
Benutzer:Totto/common.js (Quelltext anzeigen)
Version vom 1. Februar 2021, 17:44 Uhr
, 1. Februar 2021?
Totto (Diskussion | Beiträge) K (Schlechte Pareser vollen das in einer Zeile :yum:) |
Totto (Diskussion | Beiträge) K (?) |
||
Zeile 1:
function mainTotto(){
var tf=document.getElementById("p-personal");
var containerQuickJump=
var container = document.createElement(
container.setAttribute("class","TottoCustomContainer");
container.innerHTML='<a href="/wiki/ConanWiki:NextHints" dir="auto" title="Quick Acess Hints" accesskey=".">Hints</a>';
container.setAttribute("id","TottoHints");
containerQuickJump.prepend(container);
var container2 = document.createElement(
container2.setAttribute("class","TottoCustomContainer");
container2.innerHTML='<a href="/wiki/Vorlage:Anime-JP" dir="auto" title="Quick Acess Vorlage JP" accesskey=".">Vorlage JP</a>';
container2.setAttribute("id","TottoVorlageJP");
containerQuickJump.prepend(container2);
var container3 = document.createElement(
container3.setAttribute("class","TottoCustomContainer");
container3.innerHTML='<a onclick="scrollToBottom();" dir="auto" title="Quick Acess Down" accesskey=".">Downscroll</a>';
Zeile 45 ⟶ 44:
var num= hotkey.toUpperCase().charCodeAt(0);
document.addEventListener("keydown", event => { const key = event.keyCode; if(key==num){ window[function_to_call](); } } );
}
function addHotkeyF(hotkey,function_to_call){ var num= hotkey.toUpperCase().charCodeAt(0); document.addEventListener("keydown", event => { const key = event.keyCode; if(key==num){ function_to_call(); } } );
}
|