Skip to content

Commit 085bff0

Browse files
committed
Fix update.
2 parents 6082657 + eaffd91 commit 085bff0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

js/background.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ function enabled(tab, dpcloakindex) {
2525
function domainCheck(domain) {
2626
if (!domain) return '-1';
2727
for (var i in whiteList) {
28-
if (new RegExp('(?:www\\.)?(?:'+whiteList[i].replace(/^www\./, '').replace(/\./g, '\\.').replace(/\*/g, '\\w+').replace(/\?/g, '.')+')').test(domain)) {
28+
if (new RegExp('(?:www\\.|^)(?:'+whiteList[i].replace(/^www\./, '').replace(/\./g, '\\.').replace(/\*/g, '[^.]+').replace(/\?/g, '.')+')').test(domain)) {
2929
return '0';
3030
break;
3131
}
3232
}
3333
for (var i in blackList) {
34-
if (new RegExp('(?:www\\.)?(?:'+blackList[i].replace(/^www\./, '').replace(/\./g, '\\.').replace(/\*/g, '\\w+').replace(/\?/g, '.')+')').test(domain)) {
34+
if (new RegExp('(?:www\\.|^)(?:'+blackList[i].replace(/^www\./, '').replace(/\./g, '\\.').replace(/\*/g, '[^.]+').replace(/\?/g, '.')+')').test(domain)) {
3535
return '1';
3636
break;
3737
}
@@ -413,6 +413,6 @@ whiteList = JSON.parse(localStorage['whiteList']);
413413
setDPIcon();
414414
dpContext();
415415
if ((!optionExists("version") || localStorage["version"] != version) && localStorage["showUpdateNotifications"] == 'true') {
416-
if (!optionExists("version")) chrome.tabs.create({ url: chrome.extension.getURL('updated.html'), selected: false }); // very minor update, so only show to new installations.
416+
// chrome.tabs.create({ url: chrome.extension.getURL('updated.html'), selected: false }); // very minor update
417417
localStorage["version"] = version;
418418
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
},
2828
"permissions": [ "http://*/*", "https://*/*", "contextMenus", "tabs" ],
2929
"update_url": "http://clients2.google.com/service/update2/crx",
30-
"version": "0.46.56.2"
30+
"version": "0.46.56.4"
3131
}

updated.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
<body id="updatepage">
88
<span id="title">Decreased Productivity</span> by Andrew Y.<br /><br />
99
<div id="main">
10-
<h1>Updated to v0.46.56.2! (Sunday, June 5, 2016)</h1>
10+
<h1>Updated to v0.46.56.4! (Sunday, June 5, 2016)</h1>
1111
<ul>
12-
<li>v0.46.56.2:<ul>
12+
<li>v0.46.56.4:<ul>
1313
<li><strong>Proudly presenting a long-awaited feature</strong>: wildcards and single character matching support:<ul>
1414
<li>Domain Matching: <strong>domain.com</strong> matches domain.com and www.domain.com</li>
1515
<li>Wildcard Matching: <strong>*.domain.com</strong> matches anything.domain.com (but <u>not</u> domain.com (no subdomain))</li>
1616
<li>Single Character Matching: <strong>?.abc.com</strong> matches a.abc.com, b.abc.com, 2.abc.com, etc.</li>
1717
<li><strong>Note 1:</strong> the * and ? can be placed anywhere and/or combined (e.g. ab?.com, cat*.c?)</li>
1818
<li><strong>Note 2:</strong> if there are any duplicates, the whitelist always takes precedence over the blacklist</li>
19-
<li><strong>Note 3:</strong> .2 update = improved performance if you have a very large whitelist/blacklist</li>
19+
<li><strong>Note 3:</strong> .4 update = improved performance if you have a very large whitelist/blacklist</li>
2020
</ul></li>
2121
<li>the above update should also result in further improved performance</li>
2222
<li>added cloaking support for &lt;picture&gt; elements</li>

0 commit comments

Comments
 (0)