This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
FutureX e6195eb458 Version 1.0.2
Теперь по нажатии иконки расширения будет появляться меню. В нем добавил возможность выключения расширения
2018-04-12 23:57:35 +03:00

25 lines
840 B
JavaScript

//По окончании загрузки документа вызывается функция
$(document).ready(function() {
chrome.storage.sync.get(['choise'], function(items) {
var choise=items['choise'];
if(choise == undefined) choise = true;
if(choise){
var timerId = setInterval(show, 2000);
setTimeout(function() {
clearInterval(timerId);
}, 7000);
}
});
})
//При получении команды 'show' показывает ответы
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
if(request.command==="show") show();
});
//Показать ответы
function show() {
$('*[class^="correct"]').show().removeClass("ng-hide").parent().show().removeClass("ng-hide");
$("table.ng-hide").removeClass("ng-hide");
$("section").css("user-select","initial");
}