Last active
March 26, 2017 04:23
-
-
Save stepanger/49419f534a495ef435120aef2e824dab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var setting = [ | |
/google/i, | |
/habrahabr/i, | |
/kinogo/i | |
]; | |
var setting_lenght = setting.length - 1; | |
chrome.history.onVisited.addListener(function(results){ | |
var URR = results.url; | |
for (var i = 0; i <= setting_lenght; i++) { | |
if(setting[i].test(URR)){ | |
console.log("sendMesage.js ➤ TRUE ➤ " + URR); | |
chrome.history.deleteUrl({url: URR}, function(){ | |
console.info("sendMesage.js ➤ DELETE TRUE ➤ ", URR); | |
}); | |
}else{ | |
console.log("sendMesage.js ➤ FALSE ➤ onMessage ➤" + URR); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment