-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
29 lines (21 loc) · 877 Bytes
/
popup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//on click button
// let blur = document.getElementById('enable');
// blur.onclick = function(element) {
// chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
// chrome.tabs.executeScript(
// tabs[0].id,
// {file:'disable_blur.js'});
// });
// };
//Load the script without clicking
document.addEventListener('DOMContentLoaded', function() {
// onClick's logic below:
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.executeScript(
tabs[0].id,
{file:'disable_blur.js'});
});
});
//Reference
//{code: 'document.body.style.backgroundColor ="' + color +'";'});
//code: 'document.body.getElementsByClassName("blur")[1].className ="";'