Changeset View
Changeset View
Standalone View
Standalone View
extension/content-script.js
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 52 | if (!subsystem || !action) { | |||
---|---|---|---|---|---|
53 | return; | 53 | return; | ||
54 | } | 54 | } | ||
55 | 55 | | |||
56 | if (callbacks[subsystem] && callbacks[subsystem][action]) { | 56 | if (callbacks[subsystem] && callbacks[subsystem][action]) { | ||
57 | callbacks[subsystem][action](message.payload); | 57 | callbacks[subsystem][action](message.payload); | ||
58 | } | 58 | } | ||
59 | }); | 59 | }); | ||
60 | 60 | | |||
61 | var storage = (IS_FIREFOX ? chrome.storage.local : chrome.storage.sync); | 61 | SettingsUtils.get().then((items) => { | ||
62 | | ||||
63 | storage.get(DEFAULT_EXTENSION_SETTINGS, function (items) { | | |||
64 | if (items.breezeScrollBars.enabled) { | 62 | if (items.breezeScrollBars.enabled) { | ||
65 | loadBreezeScrollBars(); | 63 | loadBreezeScrollBars(); | ||
66 | } | 64 | } | ||
67 | if (items.mpris.enabled) { | 65 | | ||
66 | const mpris = items.mpris; | ||||
67 | if (mpris.enabled) { | ||||
68 | loadMpris(); | 68 | loadMpris(); | ||
69 | if (items.mprisMediaSessions.enabled) { | 69 | if (items.mprisMediaSessions.enabled) { | ||
70 | loadMediaSessionsShim(); | 70 | loadMediaSessionsShim(); | ||
71 | } | 71 | } | ||
72 | } | 72 | } | ||
73 | 73 | | |||
74 | if (items.purpose.enabled) { | 74 | if (items.purpose.enabled) { | ||
75 | sendMessage("settings", "getSubsystemStatus").then((status) => { | 75 | sendMessage("settings", "getSubsystemStatus").then((status) => { | ||
▲ Show 20 Lines • Show All 890 Lines • Show Last 20 Lines |