MSCSTSTS-TOOLS

自用工具库,命名空间mscststs

Від 06.02.2018. Дивіться остання версія.

Цей скрипт не слід встановлювати безпосередньо. Це - бібліотека для інших скриптів для включення в мета директиву // @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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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));});
			});
		}
	}();