Discussions » Creation Requests

Missing semicolon (Tampermonkey chrome and Tampermonkey opera-differents,but for what ? ) (solved)

§
Posted: 2018-11-10
Edited: 2018-11-16

Missing semicolon (Tampermonkey chrome and Tampermonkey opera-differents,but for what ? ) (solved)

This code work on Tampermonkey chrome but error 'missing semicolon' on Tampermonkey opera What a fuck?

`(function() { 'use strict';

// Ожидание события. Опрос нажатия сочетания нажатий клавиш кнопок Ctrl+Shift+f
//keypress не работает в  google chrome, вместо него keydown
addEventListener ( 'keydown',function(e){
    if ( e.shiftKey &&!e.altKey && e.ctrlKey && e.keyCode == 70)
    {
        //alert ("фокус на поиск") // Сообщение показали
        document.getElementById("search").focus();
               }})


// Your code here...

})();`

wOxxOmMod
§
Posted: 2018-11-10
Edited: 2018-11-10

I think the problem is that Opera doesn't allow redefining this particular hotkey, and the semicolon error is irrelevant, but you can add it like this: }});

§
Posted: 2018-11-10

yes ! thank

Post reply

Sign in to post a reply.