| @@ -1,2 +1,14 @@ | |||||
| body { | |||||
| min-width: 200pt; | |||||
| min-height: 200pt; | |||||
| } | |||||
| #blacklist { | #blacklist { | ||||
| width: 100%; | |||||
| height: 70%; | |||||
| } | |||||
| #confirm { | |||||
| width: 100%; | |||||
| height: 20%; | |||||
| } | } | ||||
| @@ -5,11 +5,11 @@ | |||||
| <script src="config.js"></script> | <script src="config.js"></script> | ||||
| </head> | </head> | ||||
| <body> | <body> | ||||
| Blacklisted words: | |||||
| <textarea id="blacklist"> | |||||
| <label for="blacklist">Blacklisted words:</label> | |||||
| <br> | |||||
| <textarea id="blacklist" name="blacklist"> | |||||
| </textarea> | </textarea> | ||||
| <input type="checkbox" id="debug-info" name="debug-info"> | |||||
| <label for="debug-info">Show debug info in console</label> | |||||
| <button id="confirm">Save+Close</button> | |||||
| </body> | </body> | ||||
| </html> | </html> | ||||
| @@ -14,4 +14,13 @@ document.addEventListener("DOMContentLoaded", e => { | |||||
| chrome.storage.sync.set({"blacklist": JSON.stringify(blacklist)}); | chrome.storage.sync.set({"blacklist": JSON.stringify(blacklist)}); | ||||
| }); | }); | ||||
| }); | |||||
| document.querySelector("#confirm").addEventListener("click", e => { | |||||
| const blacklist = document.querySelector("#blacklist").value.toLowerCase().split("\n").map(line => line.trim()).filter(line => line.length > 0); | |||||
| chrome.storage.sync.set({"blacklist": JSON.stringify(blacklist)}); | |||||
| window.close(); | |||||
| }); | |||||
| }); | |||||
| @@ -4,3 +4,4 @@ const script = document.createElement("script"); | |||||
| script.src = chrome.extension.getURL("inject.js"); | script.src = chrome.extension.getURL("inject.js"); | ||||
| (document.head || document.documentElement).appendChild(script); | (document.head || document.documentElement).appendChild(script); | ||||
| script.onload = script.remove; | script.onload = script.remove; | ||||