File: no-unconditional-FAQ-load.patch

package info (click to toggle)
https-everywhere 4.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,040 kB
  • ctags: 1,990
  • sloc: xml: 29,807; python: 1,839; sh: 322; makefile: 36
file content (43 lines) | stat: -rw-r--r-- 1,884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: load FAQ after install only if requested
 The first time the browser is started after installing 
 xul-ext-https-everywhere, a notification bar is shown, informing of 
 the fact that some https enforcement is active and pointing to the 
 toolbar button for options.
 .
 What is bad about that is that when the notification is dismissed, the 
 browser is forced to open https://www.eff.org/https-everywhere/faq
 .
 This is a privacy breach, as it informs the authors (and user's ISP) 
 that there is a new installation of https-everywhere.
 .
 The attached patch adds a dedicated button to the notification bar. 
 Pressing that button loads the FAQ page as before, and just dismissing 
 the notification bar does nothing. In other words, it makes the user 
 *request* the FAQ before loading it.
Author: Damyan Ivanov <dmn@debian.org>
Forwarded: https://github.com/EFForg/https-everywhere/issues/769
Bug-Debian: https://bugs.debian.org/771286

--- a/src/chrome/content/toolbar_button.js
+++ b/src/chrome/content/toolbar_button.js
@@ -122,11 +122,15 @@ httpsEverywhere.toolbarButton = {
         'https-everywhere', 
         'chrome://https-everywhere/skin/https-everywhere-24.png', 
         nBox.PRIORITY_WARNING_MEDIUM,
-	[],
-	function(action) {
-	  // see https://developer.mozilla.org/en-US/docs/XUL/Method/appendNotification#Notification_box_events
-	  gBrowser.selectedTab = gBrowser.addTab(faqURL);
-	}
+        [
+            {   accessKey: 'F',
+                callback: function(ntf, btn) {
+                    // see https://developer.mozilla.org/en-US/docs/XUL/Method/appendNotification#Notification_box_events
+                    gBrowser.selectedTab = gBrowser.addTab(faqURL);
+                },
+                label: 'FAQ…',
+            }
+        ]
       );
     }
     gBrowser.removeEventListener("DOMContentLoaded", tb.handleShowHint, true);