Greasy Fork is available in English.

MSCSTSTS-TOOLS

自用工具库,命名空间mscststs

Dit script moet niet direct worden geïnstalleerd - het is een bibliotheek voor andere scripts om op te nemen met de meta-richtlijn // @require https://update.greasyfork.org/scripts/38220/1026406/MSCSTSTS-TOOLS.js

Maker
mscststs
Versie
0.0.1.20220310050903
Gemaakt op
06-02-2018
Bijgewerkt op
10-03-2022
Licentie
N.v.t.

自用工具库

命名空间 mscststs

  • wait方法,返回一个promise,参数为选择器。用于等待一个元素,第二参数为boolean,是否需要等待内容,默认值为false,第三个参数为查询超时时间(次数),该函数的查询频率为 100ms一次,因此第三个参数为10表示查询十次/一秒,默认值为Infinity
  • sleep方法,返回一个promise,参数为毫秒。用于等待一定的时间
  • hijackXMLHttpRequest方法,返回一个 distory 函数,第一个参数是需要劫持的 Ajax 方法,使用方式是在原方法名前面加上before或者after,即可在原方法调用时处理输入和输出