diff --git a/extension/constants.js b/extension/constants.js --- a/extension/constants.js +++ b/extension/constants.js @@ -35,3 +35,5 @@ }; IS_FIREFOX = (typeof InstallTrigger !== "undefined"); // heh. + +SUPPORTED_PLATFORMS = ["linux", "openbsd"]; diff --git a/extension/extension.js b/extension/extension.js --- a/extension/extension.js +++ b/extension/extension.js @@ -532,7 +532,16 @@ // event immediately afterwards. Also avoid infinite restart loop then. var receivedMessageOnce = false; -connectHost(); +// Check for supported platform to avoid loading it on e.g. Windows and then failing +// when the extension got synced to another device and then failing +chrome.runtime.getPlatformInfo(function (info) { + if (!SUPPORTED_PLATFORMS.includes(info.os)) { + console.log("This extension is not supported on", info.os); + return; + } + + connectHost(); +}); function connectHost() { port = chrome.runtime.connectNative("org.kde.plasma.browser_integration");