[gnome-browser-extension/wip/refactor: 3/7] Drop Opera compatibility code
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-browser-extension/wip/refactor: 3/7] Drop Opera compatibility code
- Date: Thu, 4 Aug 2022 18:59:51 +0000 (UTC)
commit 76bee38850b55d4c6a390cc1aee9dcac8b38f774
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Sat Jul 9 21:52:09 2022 +0400
Drop Opera compatibility code
extension/extension.html | 24 ------------------------
extension/include/compat-common.js | 4 ++--
extension/include/constants.js | 1 -
extension/include/notifications.js | 8 --------
extension/manifest.json | 13 ++++++++++++-
5 files changed, 14 insertions(+), 36 deletions(-)
---
diff --git a/extension/include/compat-common.js b/extension/include/compat-common.js
index da9ef8d..f32923c 100644
--- a/extension/include/compat-common.js
+++ b/extension/include/compat-common.js
@@ -12,8 +12,8 @@
COMPAT.PERMISSIONS_CONTAINS = true;
COMPAT.PERMISSIONS_EVENTS = true;
-COMPAT.SYNC_STORAGE = (!COMPAT.IS_OPERA || false);
-COMPAT.NOTIFICATIONS_BUTTONS = (!COMPAT.IS_OPERA && !COMPAT.IS_FIREFOX || false);
+COMPAT.SYNC_STORAGE = true;
+COMPAT.NOTIFICATIONS_BUTTONS = (!COMPAT.IS_FIREFOX || false);
if(COMPAT.IS_FIREFOX)
{
diff --git a/extension/include/constants.js b/extension/include/constants.js
index ee57f20..3239bc3 100644
--- a/extension/include/constants.js
+++ b/extension/include/constants.js
@@ -13,7 +13,6 @@ PLATFORMS_WHITELIST = ["freebsd", "linux", "openbsd"];
COMPAT = {
IS_FIREFOX: CSS.supports("-moz-appearance: none"),
- IS_OPERA: navigator.userAgent.indexOf(' OPR/') >= 0
};
NOTIFICATION_SYNC_FAILED = 'gs-chrome-sync-fail';
diff --git a/extension/include/notifications.js b/extension/include/notifications.js
index bc46aad..0efb69e 100644
--- a/extension/include/notifications.js
+++ b/extension/include/notifications.js
@@ -97,14 +97,6 @@ GSC.notifications = (function($) {
delete options.buttons;
}
- if(COMPAT.IS_OPERA)
- {
- if(options.type === chrome.notifications.TemplateType.LIST)
- {
- options = remove_list(options);
- }
- }
-
if (callback)
{
chrome.notifications.create(name, options, callback);
diff --git a/extension/manifest.json b/extension/manifest.json
index 86f4c08..d21bad1 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -18,7 +18,18 @@
},
"background": {
- "page": "extension.html",
+ "scripts": [
+ "include/external/jquery-2.1.4.js",
+ "include/i18n.js",
+ "include/constants.js",
+ "include/compat-common.js",
+ "include/gsc.js",
+ "include/notifications.js",
+ "include/update.js",
+ "include/sync.js",
+ "include/toolbar.js",
+ "extension.js"
+ ],
"persistent": false
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]