gitbookVIP

解锁gitbook的VIP功能

当前为 2023-07-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name gitbookVIP
  3. // @name:en gitbookVIP
  4. // @namespace gitbook.taozhiyu.gitee.io
  5. // @version 0.5
  6. // @description 解锁gitbook的VIP功能
  7. // @description:en Unlock VIP features of gitbook
  8. // @author 涛之雨
  9. // @match *://app.gitbook.com/*
  10. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
  11. // @require https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js
  12. // @resource toastrCSS https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css
  13. // @icon https://app.gitbook.com/public/images/logos/rounded/256x256.png
  14. // @grant GM_addStyle
  15. // @grant GM_getResourceText
  16. // @license MIT
  17. // @run-at document-start
  18. // ==/UserScript==
  19.  
  20. /* jshint esversion: 6 */
  21. /*global toastr*/
  22. (function() {
  23. 'use strict';
  24. GM_addStyle(GM_getResourceText('toastrCSS'));
  25. [].constructor.prototype._reduce=[].constructor.prototype._reduce||[].constructor.prototype.reduce;
  26. [].constructor.prototype.reduce=function(){
  27. return(JSON.stringify(this).includes('github-sync')?this.map(a=>{
  28. for(const i in a)a[i]===false&&(a[i]=true);
  29. return a;
  30. }):this)._reduce(arguments[0],arguments[1]);
  31. };
  32. toastr.success('解锁成功','gitbook脚本加载成功!',{progressBar:true,timeOut:3000});
  33. })();