mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Add auto-config import to clickbait extension, move more funcs to shared lib
Also fix a isSafari call
This commit is contained in:
@@ -79,6 +79,20 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) {
|
||||
}
|
||||
});
|
||||
|
||||
chrome.runtime.onMessageExternal.addListener((request, sender, callback) => {
|
||||
if (CompileConfig.extensionCommunicationAllowList.includes(sender.id)) {
|
||||
if (request.message === "requestConfig") {
|
||||
callback({
|
||||
userID: Config.config.userID,
|
||||
allowExpirements: Config.config.allowExpirements,
|
||||
showDonationLink: Config.config.showDonationLink,
|
||||
showUpsells: Config.config.showUpsells,
|
||||
darkMode: Config.config.darkMode,
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
chrome.runtime.onConnect.addListener((port) => {
|
||||
if (port.name === "popup") {
|
||||
chrome.tabs.query({
|
||||
|
||||
Reference in New Issue
Block a user