Difference between revisions of "Template:Sidebar"
Adelo Vieira (talk | contribs) |
Adelo Vieira (talk | contribs) |
||
Line 331: | Line 331: | ||
} | } | ||
− | // Shortkey: | + | // Shortkey: https://www.techiedelight.com/create-keyboard-shortcuts-with-javascript-jquery-hotkeys-mousetrap-library/ |
+ | // For some reason, in MediaWiki pages, the && operator is not being interpreted by the web browser | ||
+ | // as such in «keydown» functions. The web browser is reading «&», instead of «&&» which generates a systax error. | ||
+ | // To work around this problem I just broke the function using «2» if statements: | ||
+ | |||
// $(document).keydown(function(event) { | // $(document).keydown(function(event) { | ||
// if ( (event.ctrlKey) && (event.which === 88) ) { | // if ( (event.ctrlKey) && (event.which === 88) ) { | ||
Line 354: | Line 358: | ||
// } | // } | ||
// }); | // }); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
// function moveSidebarToBody() { | // function moveSidebarToBody() { |
Revision as of 11:29, 9 March 2021