dome-test

测试Dome

目前为 2022-07-23 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/448354/1073262/dome-test.js

  1. // ==UserScript==
  2. // @name dome-test
  3. // @version 0.0.1
  4. // @description 测试Dome
  5. // @author Gamyou
  6. // @include *
  7. // @license Apache License, Version 2.0
  8. // @grant GM_getValue
  9. // @grant GM_setValue
  10. // @grant GM_log
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. console.log('=================> 开始储存myValue');
  15. GM_setValue('myValue', '123456789');
  16. console.log('=================> 储存完成,开始获取myValue');
  17. let value = GM_getValue('myValue', 'abcdefg');
  18. console.log('=================> 获取完成,开始调用GM_log进行控制台打印');
  19. GM_log('获取到的值为:' + value);
  20. console.log('=================> 打印完成');
  21. })