This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//自动触发瓜子换硬币 | |
autoExchangeCoin(); | |
async function autoExchangeCoin(){ | |
const date=(new Date).getDate(); | |
const date_GM=await GM.getValue('ex_date'); | |
console.warn(date,date_GM,date-date_GM); | |
(()=>{ | |
const t=`https://api.live.bilibili.com/pay/v1/Exchange/silver2coin`; | |
const s=async()=>{ | |
const s=await Ajax.getJsonWithCredentials(t); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//异步加载JS | |
function loadJS(src, target, callback) { | |
target = target || 'head' | |
appendElem('script', target, {src: src, onload: callback, async: true, defer: true}) | |
} | |
//动态创建元素 | |
function appendElem(tagName, target, props) { | |
var tagElem = document.createElement(tagName) | |
for (var keyName in props) { |