漫画下载

从此类使用相同框架的漫画网站上下载免费或已付费的章节

< Feedback on 漫画下载

Review: Good - script works

§
Posted: 2024-10-18

Thanks for the update even though support is no longer available.

It seems that when running the script on a type B site, buttonCSS and xhr may not work correctly because they are considered to have been accessed before initialization. I have only checked ttps://www.sunday-webry.com, so this may not be a problem elsewhere.

I have made the following modifications.

Change 1. buttonCSS has been moved to the top of the addButton function.

function addButton() {
    const buttonCSS = `display: inline-block;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 3px 3px;
    margin: 4px 0px;
    text-align: center;
    border-radius: 3px;
    border-width: 0px;`;

    let targets = [];`;
  // omitted
}

Change 2. xhr moved before starting MutationObserver.

    const xmlHttpRequest = (typeof(GM_xmlhttpRequest) === 'undefined') ? GM.xmlHttpRequest : GM_xmlhttpRequest;
    const xhr = option => new Promise((resolve, reject) => {
        xmlHttpRequest({
            ... . option,.
            onerror: reject,
            onload: (response) => {
                if (response.status >= 200 && response.status < 300) {
                    resolve(response); }
                } else {
                    reject(response); }
                }
            }, }
        }); }); }
    });

    let observer = new MutationObserver(addButton);
  // omitted
}

Translated using DeepL.

Sorry if it's not clear.

icesshadowsAuthor
§
Posted: 2024-10-19
Edited: 2024-10-19

script works fine in www.sunday-webry.com , doesn't see any problems
Can't reproduce your problem.

§
Posted: 2024-10-19

Sorry, after re-examination, this seems to be a bug that only occurs in Firefox.

Chrome130.0.6723.59 : OK
Firefox131.0.3 : NG

Greasemonkey is using v5.1.1 in both cases.

icesshadowsAuthor
§
Posted: 2024-10-19

Maybe you can try Tampermonkey in Firefox?

§
Posted: 2024-10-20

I'm really sorry.
I'm using TamperMonkey, not Greasemonkey.
I wrote GreaseMoneky by mistake. (v5.1.1 does not exist in Greasemonkey).

Post reply

Sign in to post a reply.