optimize: global.script中,GM_getValue和GM_setValue方法,添加实现。
parent
fd8c6575b9
commit
ed87887786
|
@ -1,9 +1,12 @@
|
||||||
window.__ds_global__={
|
(function(){
|
||||||
GM_registerMenuCommand: () => {},
|
const config = {};
|
||||||
GM_unregisterMenuCommand: () => {},
|
window.__ds_global__={
|
||||||
GM_openInTab: () => {},
|
GM_registerMenuCommand: () => {},
|
||||||
GM_getValue: () => {},
|
GM_unregisterMenuCommand: () => {},
|
||||||
GM_setValue: () => {},
|
GM_openInTab: () => {},
|
||||||
GM_notification: () => {}
|
GM_getValue: (key) => config[key],
|
||||||
}
|
GM_setValue: (key, value) => { config[key] = value; },
|
||||||
|
GM_notification: () => {}
|
||||||
|
}
|
||||||
|
}();
|
||||||
console.log("ds_global completed")
|
console.log("ds_global completed")
|
Loading…
Reference in New Issue