Skip to content

Commit

Permalink
Fix chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
julijonas committed Jan 20, 2018
1 parent 99ce049 commit 5a8b596
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},

"options_ui": {
"page": "options.html"
"page": "options.html",
"chrome_style": true
},

"content_scripts": [
Expand Down
10 changes: 2 additions & 8 deletions options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
function saveOptions(e) {
e.preventDefault();
console.log(document)
browser.storage.local.set({
chrome.storage.local.set({
apiKey: document.querySelector("#apiKey").value
});
}
Expand All @@ -12,12 +11,7 @@ function restoreOptions() {
document.querySelector("#apiKey").value = result.apiKey || "";
}

function onError(error) {
console.log(`Error: ${error}`);
}

var getting = browser.storage.local.get("apiKey");
getting.then(setCurrentChoice, onError);
var getting = chrome.storage.local.get("apiKey", setCurrentChoice);
}

document.addEventListener("DOMContentLoaded", restoreOptions);
Expand Down

0 comments on commit 5a8b596

Please sign in to comment.