轻小说文库++ 测试模块

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

目前為 2022-08-10 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/449306/1080042/%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

  1. /* eslint-disable no-multi-spaces */
  2. /* eslint-disable userscripts/no-invalid-headers */
  3. /* eslint-disable userscripts/no-invalid-grant */
  4.  
  5. // ==UserScript==
  6. // @name 轻小说文库++ 测试模块
  7. // @namespace TestModule-wenku8++
  8. // @version 0.1
  9. // @description 轻小说文库++的测试模块,测试GM存储和其他grant,以及模块返回值功能
  10. // @author PY-DNG
  11. // @license GPL-license
  12. // @workat https?:\/\/www.wenku8.net\/book\/\d+\.htm
  13. // @grant GM_getValue
  14. // @grant GM_setValue
  15. // @grant $
  16. // @grant $All
  17. // @grant $CrE
  18. // ==/UserScript==
  19.  
  20. (function __MAIN__() {
  21. 'use strict';
  22.  
  23. GM_setValue('key-name', {
  24. arr: [0,1,2,3,4],
  25. obj: {a:0,b:1,c:'text',d:false,e:[{},{},{}]},
  26. bool: true,
  27. str: 'text'
  28. });
  29.  
  30. const div = $CrE('div');
  31. div.innerText = JSON.stringify(GM_getValue('key-name', {})) + '\n\n\n\n' + JSON.stringify(METADATA);
  32. div.style.position = 'fixed';
  33. div.style.zIndex = '9999999999';
  34. div.style.left = div.style.top = '0';
  35. div.style.border = '1px solid green';
  36.  
  37. exports = {key: 'value', status: 200};
  38. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址