Skip to content

Instantly share code, notes, and snippets.

View GHolk's full-sized avatar

Gold Holk GHolk

View GitHub Profile
/Ⅴ
/▽▲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: tri.browserBg || browser,
os: 'windows',
native: false,
downloadPath: 'kwk',
stop: false,
ex: tri.excmds,
idList: [],
dlhandlerwrap(...args) {
return tri.downloadJob.dlhandler(...args)
var dlj=tri.downloadJob={browser:browser,os:"windows",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.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;debugger;switch(e.state.current){case"complete":job.resolve();case"interrupted":let error=new Error("download fail");error.codeName="download-error";job.reject(error);this.idList.splice(i,1);default:true}};this.browser.downloads.onChanged.addListener(this.dlhandlerwrap);this.browser.downloads.onCreated.addListener(this.dlhandlerwrap)},destroy(){this.browser.downloads.onChanged.removeListener(this.dlhandlerwrap);this.browser.downloads.onCreated.removeListener(this.dlhandlerwrap)},async download(url,
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
@GHolk
GHolk / excel-merge-sheet.js
Last active November 4, 2022 03:22
merge all excel worksheets in workbook files into a new workbook with a single worksheet.
/**
* copyright: gholk 2022 (http://gholk.github.io/contact.html)
* license: gplv3
* install: copy this file to explorer.exe shell:sendto
* require: Excel.Application and wscript or cscript
* description: merge all excel worksheets in workbook files into a new workbook with a single worksheet.
* usage:
* - right click on xls(x) file(s) and select this script in send-to sub-menu
* - or run this script with cscript and pass xls files as arguments
* - or drag and drop files onto this script
@GHolk
GHolk / jscript-with-excel-ajax-fso.js
Last active October 13, 2022 00:46
A jscript use excel object model api, activex xmlhttp and filesystem object.
/* License under GPLv3 by gholk
*
* share for reference if anyone need to deal with excel object model in jscript/vbscript and other stuff.
*/
// import JSON
// # lookup code
var debugFlag = ''
FUCK THE CCP 🇨🇳🇨🇳 💩💩💩
TAIWAN 🇹🇼 IS A COUNTRY 中華民國
Taiwan No.1 🇹🇼🇹🇼🇹🇼
🇭🇰 Liberate Hong Kong, 🇭🇰
🇭🇰 revolution of our times! 🇭🇰
FREE TIBET Dalai Lama 🏴󠁣󠁮󠀵󠀴󠁿🏴󠁣󠁮󠀵󠀴󠁿🏴󠁣󠁮󠀵󠀴󠁿
UYGHUR GENOCIDE
8964 TIANANMEN SQUARE MASSACRE
Tank man 占占点从从 天安門大屠殺
Commie Away 🖕☭🖕
// ==UserScript==
// @name google search unredirect
// @namespace http://gholk.github.io/
// @version 6
// @match https://www.google.com/search?*
// @grant none
// ==/UserScript==
function unlistenClick() {
for (const a of document.querySelectorAll('a[onmousedown]')) {
@GHolk
GHolk / element-show-mxc-reaction.user.js
Created June 15, 2021 04:03
show custom reaction in app.element.io, which has text content `mxc://*`
// ==UserScript==
// @name element show mxc reaction
// @namespace http://gholk.github.io/
// @version 2
// @match https://app.element.io/*
// @grant none
// ==/UserScript==
// license under gplv3 by gholk