Mink icon indicating copy to clipboard operation
Mink copied to clipboard

Allow wildcard URIs for blacklist

Open machawk1 opened this issue 9 years ago • 1 comments

Per @weiglemc's testing, allow the user to enter *.google.com to cause both www.google.com and drive.google.com from invoking the Mink code beyond the blacklist test.

machawk1 avatar Jan 22 '16 13:01 machawk1

Something like the following in setActiveBasedOnBlacklistedProperty() in content.js:

var blackListEntryAsRegExp = new RegExp(blacklistEntryHosthame.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"));
var matchesWildcard = documentHostName.match(blackListEntryAsRegExp);
if(matchesWildcard) {
  chrome.runtime.sendMessage({method: 'stopWatchingRequests_blacklisted'});
}

machawk1 avatar Jan 22 '16 14:01 machawk1