[email protected]

place a bookmark automatically when you open a chapter

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        [email protected]
// @namespace   zhang
// @description place a bookmark automatically when you open a chapter
// @include     http://www.du00.com/read/*/*/*.html
// @grant       GM_log
// @version     1
// ==/UserScript==


var ajax_prefix = 'javascript:Ajax.Request(';

var linkright = document.getElementById('linkright');
if (linkright) {
    var links = linkright.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
        var link = links[i];
        if (link.text == '加入书签') {
            if (link.href.substring(0, ajax_prefix.length) == ajax_prefix) {
                var quote = link.href.charAt(ajax_prefix.length);
                if (quote == "'" || quote == '"') {
                    var start = ajax_prefix.length + 1;
                    var end = link.href.indexOf(quote, start);
                    if (end > start) {
                        var url = link.href.substring(start, end);
                        //GM_log(url);
                        unsafeWindow.Ajax.Request(url);
                    }
                }
            }
        }
    }
}