Skip to content

Commit

Permalink
Merge branch 'main' into reverse-var-to-let-change
Browse files Browse the repository at this point in the history
  • Loading branch information
rebloor authored Oct 1, 2023
2 parents 1dd4504 + 6392240 commit 39a0712
Show file tree
Hide file tree
Showing 29 changed files with 8 additions and 25 deletions.
13 changes: 0 additions & 13 deletions build/README.md

This file was deleted.

Binary file removed build/apply_css-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/beastify-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/bookmark_it-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/borderify-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/chillout_page_action-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/context_menu_demo-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/cookie_bg_picker-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/emoji_substitution-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/eslint_example-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/favourite_colour-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/favourite_colour-1.1-an+fx.xpi
Binary file not shown.
Binary file removed build/history_deleter-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/latest_download-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/list_cookies-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/navigation_stats-0.1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/notify_link_clicks_i18n-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/open_my_page-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/page_to_extension_messaging-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/page_to_extension_messaging-1.0-fx.xpi
Binary file not shown.
Binary file removed build/quicknote-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/sample_commands_extension-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/sample_commands_extension-1.0-fx.xpi
Binary file not shown.
Binary file removed build/selection_to_clipboard-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/tab_strip-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/tabs_tabs_tabs-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/user_agent_rewriter-1.0-an+fx.xpi
Binary file not shown.
Binary file removed build/window_manipulator-1.0-an+fx.xpi
Binary file not shown.
20 changes: 8 additions & 12 deletions favourite-colour/options.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
function saveOptions(e) {
browser.storage.sync.set({
async function saveOptions(e) {
e.preventDefault();
await browser.storage.sync.set({
colour: document.querySelector("#colour").value
});
e.preventDefault();
}

function restoreOptions() {
let storageItem = browser.storage.managed.get('colour');
storageItem.then((res) => {
document.querySelector("#managed-colour").innerText = res.colour;
});
async function restoreOptions() {
let res = await browser.storage.managed.get('colour');
document.querySelector("#managed-colour").innerText = res.colour;

let gettingItem = browser.storage.sync.get('colour');
gettingItem.then((res) => {
document.querySelector("#colour").value = res.colour || 'Firefox red';
});
res = await browser.storage.sync.get('colour');
document.querySelector("#colour").value = res.colour || 'Firefox red';
}

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

0 comments on commit 39a0712

Please sign in to comment.