Greasy Fork is available in English.

MSCSTSTS-TOOLS

自用工具库,命名空间mscststs

Acest script nu ar trebui instalat direct. Aceasta este o bibliotecă pentru alte scripturi care este inclusă prin directiva meta a // @require https://update.greasyfork.org/scripts/38220/1026406/MSCSTSTS-TOOLS.js

Autor
mscststs
Versiune
0.0.1.20220310050903
Creat
06-02-2018
Actualizat
10-03-2022
Licență
N/A

自用工具库

命名空间 mscststs

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