Skip to content

Commit

Permalink
fixed blocking of URL including punycode, closes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutCevik committed Apr 10, 2017
1 parent 4f38c3a commit c6ccfbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ chrome.webRequest.onBeforeRequest.addListener(function (data) {
delete blockedDomainsByTabs[data.tabId];
}

var block = (data.url.indexOf("xn--") !== -1);
var domain = extractDomainFromURL(data.url);
var block = (domain.indexOf("xn--") !== -1);
if (block) {

var domain = extractDomainFromURL(data.url);
if (allowedDomains.indexOf(domain) > -1) {
return {cancel: false};
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_extensionName__",
"version": "1.0",
"version": "1.1",
"manifest_version": 2,
"icons": {
"128": "img/icon_128.png",
Expand Down

0 comments on commit c6ccfbf

Please sign in to comment.