Created
January 21, 2014 08:59
-
-
Save olsososo/8536623 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
// ==UserScript== | |
// @name test | |
// @namespace test | |
// @include http://nodejs.org/api/dns.html | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function(){ | |
var blacklistSite = ["baidu"]; | |
var blacklistTitle = ["google","hupu"]; | |
for(i in blacklistSite) | |
{ | |
if(eval("/"+blacklistSite[i]+"/gi").test(location.href)){ | |
console.log("blacklistSite!"); | |
return; | |
} | |
} | |
for(i in blacklistTitle) | |
{ | |
if(eval("/"+blacklistTitle[i]+"/gi").test(document.title)){ | |
console.log("blacklistTitle"); | |
return; | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment