起点中文网作者、作家、大神替换成枪手

大家都是起点请来的无工资枪手,就不要自称什么作者了。

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         起点中文网作者、作家、大神替换成枪手
// @namespace    http://www.lkong.net/home.php?mod=space&uid=516696
// @version      0.2.1
// @description  大家都是起点请来的无工资枪手,就不要自称什么作者了。
// @author       仙圣
// @include        *://*.qidian.com/*
// @exclude       *://read.qidian.com/chapter/*/*
// @exclude       *://vipreader.qidian.com/chapter/*/*
// ==/UserScript==
var replaceArry = [
    [/作者/gi, '枪手'],
    [/作家/gi, '枪手'],
    [/大神/gi, '枪手'],
];
setInterval(function() {
var numTerms = replaceArry.length;
var txtWalker = document.createTreeWalker(
    document.body,
    NodeFilter.SHOW_TEXT, {
        acceptNode: function(node) {
            if (node.nodeValue.trim())
                return NodeFilter.FILTER_ACCEPT;

            return NodeFilter.FILTER_SKIP;
        }
    },
    false
);
var txtNode = null;


    while (txtNode = txtWalker.nextNode()) {
        var oldTxt = txtNode.nodeValue;

        for (var J = 0; J < numTerms; J++) {
            oldTxt = oldTxt.replace(replaceArry[J][0], replaceArry[J][1]);
        }
        txtNode.nodeValue = oldTxt;
    }

}, 3000);