[Pkg-mozext-commits] [firegestures] 05/10: remove compatibility code

David Prévot taffit at moszumanska.debian.org
Thu Oct 29 20:57:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firegestures.

commit 5102a3628a569a05a68c6f557d3e3e87e9fc2beb
Author: Gomita <gomita at xuldev.org>
Date:   Tue Sep 29 01:22:13 2015 +0900

    remove compatibility code
---
 chrome/content/firegestures/browser.js    | 17 +++--------------
 chrome/content/firegestures/viewSource.js |  7 +------
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/chrome/content/firegestures/browser.js b/chrome/content/firegestures/browser.js
index 3be7b26..d0c2f45 100644
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@ -31,10 +31,7 @@ var FireGestures = {
 		this._gestureHandler.attach(gBrowser, this);
 		this._gestureMapping = gestureSvc.getMappingForBrowser();
 		this._getLocaleString = gestureSvc.getLocaleString;
-		this._statusTextField = document.getElementById("statusbar-display");
-		// [Firefox26] status panel will be generated dynamically @see Bug 821687
-		if (!this._statusTextField)
-			this._statusTextField = gBrowser.getStatusPanel();
+		this._statusTextField = gBrowser.getStatusPanel();
 		// disable built-in swipe gesture
 		window.removeEventListener("MozSwipeGesture", gGestureSupport, true);
 		// [e10s] load frame script into every browser in window
@@ -847,16 +844,8 @@ var FireGestures = {
 		if (shouldPrompt && tabs.length > 1) {
 			var ps = Services.prompt;
 			var bundle = gBrowser.mStringBundle;
-			var message;
-			try {
-				// [Firefox29-]
-				message = bundle.getFormattedString("tabs.closeWarningMultipleTabs", [tabs.length]);
-			}
-			catch (ex) {
-				// [Firefox30+]
-				message = PluralForm.get(tabs.length, bundle.getString("tabs.closeWarningMultiple")).
-				          replace("#1", tabs.length);
-			}
+			var message = PluralForm.get(tabs.length, bundle.getString("tabs.closeWarningMultiple")).
+			              replace("#1", tabs.length);
 			window.focus();
 			var ret = ps.confirmEx(
 				window, bundle.getString("tabs.closeWarningTitle"), message, 
diff --git a/chrome/content/firegestures/viewSource.js b/chrome/content/firegestures/viewSource.js
index 0688f07..26f1ddc 100644
--- a/chrome/content/firegestures/viewSource.js
+++ b/chrome/content/firegestures/viewSource.js
@@ -18,12 +18,7 @@ var FireGesturesViewSource = {
 		this._gestureHandler.attach(getBrowser(), this);
 		this._gestureMapping = gestureSvc.getMapping("viewsource_mapping");
 		// disable built-in swipe gesture
-		// [Firefox40-]
-		if ("HandleSwipeGesture" in window)
-			window.removeEventListener("MozSwipeGesture", HandleSwipeGesture, true);
-		// [Firefox41+]
-		if ("ViewSourceChrome" in window)
-			window.removeEventListener("MozSwipeGesture", ViewSourceChrome, true);
+		window.removeEventListener("MozSwipeGesture", ViewSourceChrome, true);
 	},
 
 	uninit: function() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firegestures.git



More information about the Pkg-mozext-commits mailing list