討論 » 建立請求

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

§
發表於:2018-11-10
編輯: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...

})();`

woxxom管理員
§
發表於:2018-11-10
編輯: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: }});

§
發表於:2018-11-10

yes ! thank

發表回覆

登入以回覆

长期地址
遇到问题?请前往 GitHub 提 Issues。