轻小说文库++ 测试模块

轻小说文库++的测试模块,测试GM存储和其他grant,以及模块返回值功能

Version vom 10.08.2022. Aktuellste Version

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyforks.org/scripts/449306/1080078/%E8%BD%BB%E5%B0%8F%E8%AF%B4%E6%96%87%E5%BA%93%2B%2B%20%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%9D%97.js

/* eslint-disable no-multi-spaces */
/* eslint-disable userscripts/no-invalid-headers */
/* eslint-disable userscripts/no-invalid-grant */

// ==UserScript==
// @name               轻小说文库++ 测试模块
// @namespace          TestModule-wenku8++
// @version            0.2
// @description        轻小说文库++的测试模块,测试GM存储和其他grant,以及模块返回值功能
// @author             PY-DNG
// @license            GPL-license
// @workat             https?:\/\/www.wenku8.net\/book\/\d+\.htm
// @grant              GM_getValue
// @grant              GM_setValue
// @grant              $
// @grant              $All
// @grant              $CrE
// ==/UserScript==

(function __MAIN__() {
    'use strict';

	GM_setValue('key-name', {
		arr: [0,1,2,3,4],
		obj: {a:0,b:1,c:'text',d:false,e:[{},{},{}]},
		bool: true,
		str: 'text'
	});

	const div = $CrE('div');
	div.innerText = JSON.stringify(GM_getValue('key-name', {})) + '\n\n\n\n' + JSON.stringify(METADATA);
	div.style.position = 'fixed';
	div.style.zIndex = '9999999999';
	div.style.left = div.style.top = '0';
	div.style.border = '1px solid green';
	document.body.appendChild(div);

	exports = {key: 'value', status: 200};
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。