[chrome-gnome-shell] compat: added dummy events for Firefox



commit 7cbd914710feff3e077d2d887c448252ae9c291a
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Fri Mar 9 10:04:39 2018 +0400

    compat: added dummy events for Firefox
    
    Mozilla-Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1444294

 extension/include/compat-common.js |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/extension/include/compat-common.js b/extension/include/compat-common.js
index 3606a31..9afa47f 100644
--- a/extension/include/compat-common.js
+++ b/extension/include/compat-common.js
@@ -31,6 +31,36 @@ if(typeof(chrome.permissions) === 'undefined')
        COMPAT.PERMISSIONS_CONTAINS = false;
 }
 
+if(typeof(chrome.permissions.onAdded) === 'undefined')
+{
+       chrome.permissions.onAdded = {
+                       addListener: function(callback) {
+                               // Do nothing
+                       },
+                       removeListener: function(callback) {
+                               // Do nothing
+                       },
+                       hasListener: function(callback) {
+                               // Do nothing
+                       }
+       }
+}
+
+if(typeof(chrome.permissions.onRemoved) === 'undefined')
+{
+       chrome.permissions.onRemoved = {
+                       addListener: function(callback) {
+                               // Do nothing
+                       },
+                       removeListener: function(callback) {
+                               // Do nothing
+                       },
+                       hasListener: function(callback) {
+                               // Do nothing
+                       }
+       }
+}
+
 if(typeof(chrome.storage.sync) === 'undefined')
 {
        chrome.storage.sync = chrome.storage.local;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]