Skip to content

Commit

Permalink
Renamed updateGreyness() to syncFade() for readability ↞ [auto-sy…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Nov 18, 2024
1 parent f665652 commit ab75ac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions starters/chrome/extension/popup/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
function notify(msg) { sendMsgToActiveTab({ action: 'notify', msg: msg, pos: 'bottom-right' })}
function syncStorageToUI() { return sendMsgToActiveTab({ action: 'sync.storageToUI' })}

function updateGreyness() {
function syncFade() {

// Updated toolbar icon
const iconDimensions = [16, 32, 64, 128], iconPaths = {}
Expand All @@ -38,15 +38,15 @@
settings.load('extensionDisabled')
.then(function() { // restore extension/toggle states
masterToggle.checked = !config.extensionDisabled
updateGreyness()
syncFade()
})

// Add main toggle click-listener
const toggles = document.querySelectorAll('input'),
masterToggle = toggles[0]
masterToggle.addEventListener('change', function() {
settings.save('extensionDisabled', !this.checked)
syncStorageToUI() ; updateGreyness()
syncStorageToUI() ; syncFade()
notify(`${chrome.runtime.getManifest().name} ${ this.checked ? 'ON' : 'OFF' }`)
})

Expand Down

0 comments on commit ab75ac6

Please sign in to comment.