OLD | NEW |
1 var backgroundPage = chrome.extension.getBackgroundPage(); | 1 var backgroundPage = chrome.extension.getBackgroundPage(); |
2 var imports = ["FilterStorage", "Filter", "isWhitelisted", "extractHostFromURL",
"refreshIconAndContextMenu"]; | 2 var imports = ["require", "isWhitelisted", "extractHostFromURL", "refreshIconAnd
ContextMenu"]; |
3 for (var i = 0; i < imports.length; i++) | 3 for (var i = 0; i < imports.length; i++) |
4 window[imports[i]] = backgroundPage[imports[i]]; | 4 window[imports[i]] = backgroundPage[imports[i]]; |
5 | 5 |
| 6 var Filter = require("filterClasses").Filter; |
| 7 var FilterStorage = require("filterStorage").FilterStorage; |
| 8 |
6 var tab = null; | 9 var tab = null; |
7 | 10 |
8 function init() | 11 function init() |
9 { | 12 { |
10 // Attach event listeners | 13 // Attach event listeners |
11 $("#enabled").click(toggleEnabled); | 14 $("#enabled").click(toggleEnabled); |
12 $("#clickHideButton").click(activateClickHide); | 15 $("#clickHideButton").click(activateClickHide); |
13 $("#cancelButton").click(cancelClickHide); | 16 $("#cancelButton").click(cancelClickHide); |
14 | 17 |
15 // Ask content script whether clickhide is active. If so, show cancel button. | 18 // Ask content script whether clickhide is active. If so, show cancel button. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 document.getElementById("clickHideInactiveStuff").style.display = "none"; | 96 document.getElementById("clickHideInactiveStuff").style.display = "none"; |
94 document.getElementById("clickHideActiveStuff").style.display = "inherit"; | 97 document.getElementById("clickHideActiveStuff").style.display = "inherit"; |
95 } | 98 } |
96 | 99 |
97 function clickHideInactiveStuff() | 100 function clickHideInactiveStuff() |
98 { | 101 { |
99 document.getElementById("enabledCheckboxAndLabel").style.display = "block"; | 102 document.getElementById("enabledCheckboxAndLabel").style.display = "block"; |
100 document.getElementById("clickHideActiveStuff").style.display = "none"; | 103 document.getElementById("clickHideActiveStuff").style.display = "none"; |
101 document.getElementById("clickHideInactiveStuff").style.display = "inherit"; | 104 document.getElementById("clickHideInactiveStuff").style.display = "inherit"; |
102 } | 105 } |
OLD | NEW |