Skip to content

Commit eaffd91

Browse files
committed
Tweaked Wildcard Matching
1 parent f5f7ec8 commit eaffd91

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

js/background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function setDPIcon() {
278278
}
279279
function regexify(arr) {
280280
if (arr.length == 0) return '';
281-
return '(?:www\\.|^)(?:'+arr.join('|').replace(/(^|\|)www\./g, '$1').replace(/\./g, '\\.').replace(/\*/g, '\\w+').replace(/\?/g, '.')+')';
281+
return '(?:www\\.|^)(?:'+arr.join('|').replace(/(^|\|)www\./g, '$1').replace(/\./g, '\\.').replace(/\*/g, '[^.]+').replace(/\?/g, '.')+')';
282282
}
283283
// ----- Request library to support content script communication
284284
chrome.tabs.onUpdated.addListener(function(tabid, changeinfo, tab) {
@@ -407,6 +407,6 @@ setDPIcon();
407407
dpContext();
408408
if ((!optionExists("version") || localStorage["version"] != version) && localStorage["showUpdateNotifications"] == 'true') {
409409
//chrome.tabs.create({ url: chrome.extension.getURL('updated.html'), selected: false });
410-
// v0.46.56.2 is a minor update, so no need to show update notification.
410+
// v0.46.56.2 and 3 are a minor update, so no need to show update notification.
411411
localStorage["version"] = version;
412412
}

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.3"
3131
}

updated.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
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, May 29, 2016)</h1>
10+
<h1>Updated to v0.46.56.3! (Sunday, May 29, 2016)</h1>
1111
<ul>
12-
<li>v0.46.56.2:<ul>
12+
<li>v0.46.56.3:<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>

0 commit comments

Comments
 (0)