diff --git a/js/home.js b/js/home.js index 30010f6..fad3237 100644 --- a/js/home.js +++ b/js/home.js @@ -1,5 +1,5 @@ function restore_options() { - chrome.storage.sync.get("links", function(result){ + browser.storage.sync.get("links", function(result){ var quads = document.querySelectorAll('a') for (i = 0; i < quads.length; i++) { if (result.links[i]) { @@ -9,7 +9,7 @@ function restore_options() { } } }) - chrome.storage.sync.get("colors", function(result){ + browser.storage.sync.get("colors", function(result){ var quads = document.querySelectorAll('a') var style = document.createElement('style'); for (i = 0; i < quads.length; i++) { @@ -21,7 +21,7 @@ function restore_options() { } document.head.appendChild(style) }) - chrome.storage.sync.get("mode", function(result){ + browser.storage.sync.get("mode", function(result){ if (result.mode) { switch(result.mode) { case "light": @@ -35,7 +35,7 @@ function restore_options() { } } else { mode = "light" - chrome.storage.sync.set({mode:"light"}) + browser.storage.sync.set({mode:"light"}) } }) } diff --git a/js/options.js b/js/options.js index 571fde1..814e294 100644 --- a/js/options.js +++ b/js/options.js @@ -13,12 +13,12 @@ function save_options() { links.push(input_links[i].value) colors.push(input_colors[i].value) } - chrome.storage.sync.set({links:links, colors:colors}) + browser.storage.sync.set({links:links, colors:colors}) console.log("Settings Saved ") } function restore_options() { var mode - chrome.storage.sync.get("mode", function(result){ + browser.storage.sync.get("mode", function(result){ if (result.mode) { switch(result.mode) { case "light": @@ -32,17 +32,17 @@ function restore_options() { } } else { mode = "light" - chrome.storage.sync.set({mode:"light"}) + browser.storage.sync.set({mode:"light"}) save_options() } }) - chrome.storage.sync.get("links", function(result){ + browser.storage.sync.get("links", function(result){ var input_links = document.querySelectorAll('input[type="text"]') for (i = 0; i < input_links.length; i++) { input_links[i].value = result.links[i] } }) - chrome.storage.sync.get("colors", function(result){ + browser.storage.sync.get("colors", function(result){ var input_colors = document.querySelectorAll('input[type="color"]') for (i = 0; i < input_colors.length; i++) { if (result.colors[i]) { @@ -52,13 +52,13 @@ function restore_options() { }) } function change_mode() { - chrome.storage.sync.get("mode", function(result){ + browser.storage.sync.get("mode", function(result){ var input_colors = document.querySelectorAll('input[type="color"]') switch(result.mode) { case "light": document.body.classList.add('dark') mode = "dark" - chrome.storage.sync.set({mode:"dark"}) + browser.storage.sync.set({mode:"dark"}) for (i = 0; i < input_colors.length; i++) { if (input_colors[i].value == "#cfcfcf") { input_colors[i].value = "#323234" @@ -69,7 +69,7 @@ function change_mode() { case "dark": document.body.classList.remove('dark') mode = "light" - chrome.storage.sync.set({mode:"light"}) + browser.storage.sync.set({mode:"light"}) for (i = 0; i < input_colors.length; i++) { if (input_colors[i].value == "#323234") { input_colors[i].value = "#cfcfcf" diff --git a/manifest.json b/manifest.json index 34a1ccb..7994bbf 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Placid Tab 2 - New Tab Page", "short_name": "Placid Tab 2", - "version": "1.0.0", + "version": "1.0.0.1", "manifest_version": 2, "description": "A minimal New Tab page", "author": "Kyle Mitchell", @@ -11,5 +11,11 @@ "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, - "permissions": ["storage"] + "permissions": ["storage"], + "applications": { + "gecko": { + "id": "placidtab2@kylemitchell.me", + "strict_min_version": "57.0" + } +} }