MSCSTSTS-TOOLS

自用工具库,命名空间mscststs

Från och med 2018-02-06. Se den senaste versionen.

Detta skript bör inte installeras direkt. Det är ett bibliotek för andra skript att inkludera med meta-direktivet // @require https://update.greatest.deepsurf.us/scripts/38220/249279/MSCSTSTS-TOOLS.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey 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 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.

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

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

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!)

var mscststs= new class{
		sleep(miliseconds){ //用于等待
			return new Promise(resolve=>{
				setTimeout(()=>{resolve();},miliseconds);
			});
		}
		async Step(selector,callback){ //循环查看
			while(document.querySelector(selector)===null){
				await this.sleep(100);
			}
			
			callback(selector);
		}
		wait(selector){ //Promise 一个元素
			return new Promise(resolve=>{
				this.Step(selector,function(selector){resolve(document.querySelector(selector));});
			});
		}
	}();