Skip to content

Commit 0c120ca

Browse files
committed
Added support for www. items
1 parent e8cdd9c commit 0c120ca

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

changelog.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v0.46.56 - Wednesday, May 25, 2016
1+
v0.46.56.1 - Wednesday, May 25, 2016
22
- Proudly presenting a long-awaited feature: wildcards and single character matching support:
33
--- Domain Matching: domain.com matches domain.com and www.domain.com
44
--- Wildcard Matching: *.domain.com matches anything.domain.com (but not domain.com (no subdomain))

js/background.js

Lines changed: 1 addition & 1 deletion
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(/\./g, '\\.').replace(/\*/g, '\\w+').replace(/\?/g, '.')+')';
281+
return '(?:www\\.)?(?:'+arr.join('|').replace(/(^|\|)www\./g, '$1').replace(/\./g, '\\.').replace(/\*/g, '\\w+').replace(/\?/g, '.')+')';
282282
}
283283
// ----- Request library to support content script communication
284284
chrome.tabs.onUpdated.addListener(function(tabid, changeinfo, tab) {

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"
30+
"version": "0.46.56.1"
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! (Wednesday, May 25, 2016)</h1>
10+
<h1>Updated to v0.46.56.1! (Wednesday, May 25, 2016)</h1>
1111
<ul>
12-
<li>v0.46.56:<ul>
12+
<li>v0.46.56.1:<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)