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

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);