Last active
April 27, 2023 08:57
-
-
Save KnIfER/4673ff34567962e8c49d6229527febed to your computer and use it in GitHub Desktop.
novel_guard.user.js
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 小说守护神 | |
// @namespace https://gist.github.com/KnIfER | |
// @description 首次访问小说网站时,自动开启以下两项设置:-- ①禁止跨域跳转 -- ② 自动开启无图模式 | |
// @version 1 | |
// @match *://*/* | |
// @run-at document-start | |
// @run-at document-end | |
// @grant GM_blockImage | |
// @grant GM_blockCorsJump | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
//console.log(document.title, document.body); | |
if(document.title.indexOf('章')>=0 | |
&& ( | |
document.title.indexOf('小说')>=0 | |
|| document.title.indexOf('阅')>=0 | |
|| document.title.indexOf('阁')>=0 | |
|| document.title.indexOf('厢')>=0 | |
) | |
&& location.host.indexOf('faloo.com')==-1 | |
&& location.host.indexOf('17k.com')==-1 | |
&& location.host.indexOf('zongheng.com')==-1 | |
&& location.host.indexOf('qidian.com')==-1 | |
&& location.host.indexOf('fanqienovel.com')==-1 | |
) | |
{ | |
if(GM_configDomain(true)) { | |
GM_blockImage(true); | |
GM_blockCorsJump(true); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment