Greasy Fork is available in English.

gitbookVIP

解锁gitbook的VIP功能

  1. // ==UserScript==
  2. // @name gitbookVIP
  3. // @name:en gitbookVIP
  4. // @namespace gitbook.taozhiyu.gitee.io
  5. // @version 0.6
  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. const i18n={
  25. "zh-CN": ['解锁成功','gitbook脚本加载成功!'],
  26. "en": ['Unlocked successfully','gitbook script loaded successfully!']
  27. };
  28. GM_addStyle(GM_getResourceText('toastrCSS'));
  29. [].constructor.prototype._reduce=[].constructor.prototype._reduce||[].constructor.prototype.reduce;
  30. [].constructor.prototype.reduce=function(){
  31. return(JSON.stringify(this).includes('github-sync')?this.map(a=>{
  32. for(const i in a)a[i]===false&&(a[i]=true);
  33. return a;
  34. }):this)._reduce(arguments[0],arguments[1]);
  35. };
  36. let lan="en";
  37. if((navigator.language || navigator.userLanguage).toLowerCase().startsWith("zh"))lan="zh-CN";
  38. toastr.success(...i18n[lan],{progressBar:true,timeOut:3000});
  39. })();