Skip to content

Commit

Permalink
Moved syncStorageToUI() to UI functions section for readability ↞ […
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Nov 21, 2024
1 parent 0c56e7b commit 65b4bae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@

// Define UI functions

async function syncStorageToUI() { // on toolbar popup toggles + ChatGPT tab activations
await settings.load('extensionDisabled', 'infinityMode', ...Object.keys(settings.controls))
sidebarToggle.update() // based on config.toggleHidden + config.infinityMode
}

const sidebarToggle = {

create() {
Expand Down Expand Up @@ -243,13 +248,6 @@
toggle() { infinity[config.infinityMode ? 'activate' : 'deactivate']() }
}

// Define SYNC function

async function syncStorageToUI() { // on toolbar popup toggles + ChatGPT tab activations
await settings.load('extensionDisabled', 'infinityMode', ...Object.keys(settings.controls))
sidebarToggle.update() // based on config.toggleHidden + config.infinityMode
}

// Run MAIN routine

// Init BROWSER/UI props
Expand Down
12 changes: 5 additions & 7 deletions firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@

// Define UI functions

async function syncStorageToUI() { // on toolbar popup toggles + ChatGPT tab activations
await settings.load('extensionDisabled', 'infinityMode', ...Object.keys(settings.controls))
sidebarToggle.update() // based on config.toggleHidden + config.infinityMode
}

const sidebarToggle = {

create() {
Expand Down Expand Up @@ -247,13 +252,6 @@
toggle() { infinity[config.infinityMode ? 'activate' : 'deactivate']() }
}

// Define SYNC function

async function syncStorageToUI() { // on toolbar popup toggles + ChatGPT tab activations
await settings.load('extensionDisabled', 'infinityMode', ...Object.keys(settings.controls))
sidebarToggle.update() // based on config.toggleHidden + config.infinityMode
}

// Run MAIN routine

// Init BROWSER/UI props
Expand Down

0 comments on commit 65b4bae

Please sign in to comment.