小编use*_*513的帖子

XMLHttpRequest多次启动,而不启动onreadystatechange函数

有问题的用户脚本:http ://userscripts.org/scripts/show/130532

在将其创建的网站更新为HTML5之后,我不得不更新脚本。但是,现在有一个很大的问题。当我启动包含XMLHttpRequest的脚本的主要功能时,它只是向这些控制台发送垃圾邮件,直到浏览器崩溃。

现在,我在StackOverflow和Google中四处寻找可以帮助我的东西,但是没有任何帮助。

如果继续尝试该脚本,请小心,因为它会使浏览器崩溃。至少在FF 11.00中对我有用

码:

// ==UserScript==
// @name           Where my thread at
// @include        *//boards.4chan.org/*/res/*
// ==/UserScript==

(function () {
    "use strict";
    var board = document.location.href.match(/https?:\/\/boards\.4chan\.org\/[\w]+/i), threadNo = location.pathname.match(/\/res\/([\d]+)/i), main = document.getElementsByName("delform")[0], is404 = 0, ttt = null, b, c, num, timer, html, i, l, no, found, xhr1, xhr2, cstatus, ui, pg;

    function lookup(resp) {
        html = resp.match(/<div class="postContainer opContainer".*?<\/div>[^<]*?<\/div>/gi);
        if (html) {
            l = html.length;
            for (i = 0; i < l; i += i) …
Run Code Online (Sandbox Code Playgroud)

javascript xmlhttprequest userscripts

0
推荐指数
1
解决办法
4389
查看次数

标签 统计

javascript ×1

userscripts ×1

xmlhttprequest ×1