"
@@ -28,5 +29,5 @@
"48": "img/icon48.png",
"128": "img/icon128.png"
},
- "web_accessible_resources": ["img/icon219.svg", "img/compress.svg"]
+ "web_accessible_resources": [ "img/icon219.svg", "img/compress.svg", "img/introSkip.svg" ]
}
diff --git a/src/options.html b/src/options.html
index 716688f..215f953 100644
--- a/src/options.html
+++ b/src/options.html
@@ -1,37 +1,96 @@
+
+
+
Enhance-O-Tron Settings
-
-
-
Enable Enhance-O-Tron on this Domain?
-
- If you are running Plex on this domain, you must give Enhance-O-Tron permission to run here.
-
-
-
-
-
-
-
-
- Enhance-O-Tron for Plex is enabled on this domain.
-
-
-
-
-
- Permission was denied. Click "Allow" on the browser prompt, or use https://app.plex.tv instead.
-
-
-
-
+
+
+
+
+
+
Enable Enhance-O-Tron on this Domain?
+
+ If you are running Plex on this domain, you must give Enhance-O-Tron permission to run here.
+
+
+
+
+
+
+
+
+ Enhance-O-Tron for Plex is enabled on this domain.
+
+
+
+
+
+
+ Permission was denied. Click "Allow" on the browser prompt, or use https://app.plex.tv instead.
+
+
+
+
+
+ Something went wrong, could not remove domain.
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/options.js b/src/options.js
index 3144e32..615c104 100644
--- a/src/options.js
+++ b/src/options.js
@@ -32,7 +32,7 @@ function saveOptions(e) {
chrome.permissions.request({
origins: [url]
- }, function(granted) {
+ }, (granted) => {
if (granted) {
chrome.tabs.reload(tabId);
window.close();
@@ -42,7 +42,23 @@ function saveOptions(e) {
});
}
+function removeDomain(e) {
+ e.preventDefault();
+
+ chrome.permissions.remove({
+ origins: [url]
+ }, (removed) => {
+ if (removed) {
+ document.getElementById("enabled").style.display = "none";
+ document.getElementById("disabled").style.display = "block";
+ } else {
+ document.getElementById("removeError").style.display = "block";
+ }
+ })
+}
+
chrome.tabs.query({ active: true, currentWindow: true }, getUrl);
document.getElementById('option-no').addEventListener("click", function() {window.close();});
document.getElementById('option-yes').addEventListener("click", saveOptions);
+document.getElementById('option-remove').addEventListener("click", removeDomain);