Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Commit 139119c

Browse files
committed
random cleanup before 0.9.9.0
1 parent 23d4e84 commit 139119c

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

assets/httpsb/ubiquitous-block-lists.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"title": "Malware Domain List"
1313
},
1414
"hosts-file.net/ad-servers": {
15-
"title": "hpHosts’s Ad and tracking servers"
15+
"title": "hpHosts’s Ad and tracking servers (overzealous lately)"
1616
},
1717
"someonewhocares.org/hosts/hosts": {
1818
"title": "Dan Pollock’s hosts file"

js/background.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,25 @@
2323

2424
/******************************************************************************/
2525

26-
var HTTPSB = {
26+
var HTTPSB = (function() {
27+
28+
/******************************************************************************/
29+
30+
var defaultUserAgentStrings = [
31+
'# http://www.useragentstring.com/pages/Chrome/',
32+
'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36',
33+
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36',
34+
'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36',
35+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36',
36+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36'
37+
];
38+
39+
var getDefaultUserAgentStrings = function() {
40+
return defaultUserAgentStrings.join('\n');
41+
};
42+
43+
44+
return {
2745
manifest: chrome.runtime.getManifest(),
2846

2947
userSettings: {
@@ -51,17 +69,14 @@ var HTTPSB = {
5169
smartAutoReload: 'all',
5270
spoofUserAgent: false,
5371
spoofUserAgentEvery: 5,
54-
spoofUserAgentWith: '# http://techblog.willshouse.com/2012/01/03/most-common-user-agents/\nMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4\nMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36\n',
72+
spoofUserAgentWith: getDefaultUserAgentStrings(),
5573
statsFilters: {},
5674
strictBlocking: true,
5775
subframeColor: '#cc0000',
5876
subframeOpacity: 100
5977
},
6078

61-
runtimeId: 1,
6279
clearBrowserCacheCycle: 0,
63-
inlineFieldSeparator: '#',
64-
6580
updateAssetsEvery: 5 * 24 * 60 * 60 * 1000,
6681
projectServerRoot: 'https://raw2.github.com/gorhill/httpswitchboard/master/',
6782

@@ -122,18 +137,12 @@ var HTTPSB = {
122137
userAgentReplaceStr: '',
123138
userAgentReplaceStrBirth: 0,
124139

125-
// internal state
126-
webRequestHandler: false,
127-
128140
// record what chromium is doing behind the scene
129141
behindTheSceneURL: 'http://chromium-behind-the-scene/',
130142
behindTheSceneTabId: 0x7FFFFFFF,
131143
behindTheSceneMaxReq: 250,
132144
behindTheSceneScopeKey: 'chromium-behind-the-scene',
133145

134-
// Popup menu
135-
port: null,
136-
137146
// Commonly encountered strings
138147
chromeExtensionURLPrefix: 'chrome-extension://',
139148
noopCSSURL: chrome.runtime.getURL('css/noop.css'),
@@ -145,3 +154,7 @@ var HTTPSB = {
145154

146155
/******************************************************************************/
147156

157+
})();
158+
159+
/******************************************************************************/
160+

manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"permissions": [
7171
"browsingData",
7272
"contentSettings",
73-
"contextMenus",
7473
"cookies",
7574
"downloads",
7675
"storage",

0 commit comments

Comments
 (0)