Greasy Fork is available in English.

Discussões » Criação de Solicitações

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

§
Publicado: 10/11/2018
Editado: 16/11/2018

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
§
Publicado: 10/11/2018
Editado: 10/11/2018

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: }});

§
Publicado: 10/11/2018

yes ! thank

Publicar resposta

Faça o login para publicar uma resposta.