Skip to content

Instantly share code, notes, and snippets.

View GHolk's full-sized avatar

Gold Holk GHolk

View GitHub Profile
var downloadJob = tri.downloadJob = {
browser: tri.browserBg || browser,
os: 'windows',
native: false,
downloadPath: 'kwk',
stop: false,
ex: tri.excmds,
idList: [],
dlhandlerwrap(...args) {
return tri.downloadJob.dlhandler(...args)
/Ⅴ
/▽▲TRiNITY▲▽
/◆2sRGUbBO9j2n
/○○(物理)
/《Diablo》(暗黑破壞神)系列
/《MegaMari_-魔理沙的野望/メガマリ_-魔理沙の野望-》
/《StarCraft》(星海爭霸)系列
/きゅぴシュー
/きゅぴシュ~DANGEROUS!!
/ぐるたみん
alias jse js 'use strict'; function $all(q, root=document) { return Array.from(root.querySelectorAll(q)) }; function $(q, root=document) { return root.querySelector(q) }; let $ex = (s) => tri.controller.acceptExCmd(s) ; let $set = (...args) => tri.config.set(...args); let $d = document; let $w = window;
command dlx jse var downloadJob=tri.downloadJob={browser:tri.browserBg||browser,os:"windows",native:false,downloadPath:"kwk",stop:false,ex:tri.excmds,idList:[],dlhandlerwrap(...args){return tri.downloadJob.dlhandler(...args)},dlhandler(){},async init(){const tab=await this.browser.tabs.query({active:true,currentWindow:true});this.tabId=tab[0].id;this.windowId=tab[0].windowId;return;this.dlhandle=function(e){const i=this.idList.findIndex(x=>x.id==e.id);if(i==-1)return;const job=this.idList[i];let state;if(typeof e.state=="object")state=e.state.current;else state=e.state;switch(e.state.current){case"complete":job.resolve();case"interrupted":let error=new Error("download fail");error.codeName="download-error";job
var downloadJob = tri.downloadJob = {
browser: browser,
os: "linux",
native: false,
downloadPath: "kwk",
stop: false,
ex: tri.excmds,
async init(id = null) {
if (tri.browserBg) this.browser = tri.browserBg
let tab