gitbookVIP

解锁gitbook的VIP功能

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name               gitbookVIP
// @name:en            gitbookVIP
// @namespace          gitbook.taozhiyu.gitee.io
// @version            0.6
// @description        解锁gitbook的VIP功能
// @description:en     Unlock VIP features of gitbook
// @author             涛之雨
// @match              *://app.gitbook.com/*
// @require            https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @require            https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js
// @resource           toastrCSS https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css
// @icon               https://app.gitbook.com/public/images/logos/rounded/256x256.png
// @grant              GM_addStyle
// @grant              GM_getResourceText
// @license            MIT
// @run-at             document-start
// ==/UserScript==

/* jshint esversion: 6 */
/*global toastr*/
(function() {
    'use strict';
    const i18n={
        "zh-CN": ['解锁成功','gitbook脚本加载成功!'],
        "en": ['Unlocked successfully','gitbook script loaded successfully!']
    };
    GM_addStyle(GM_getResourceText('toastrCSS'));
    [].constructor.prototype._reduce=[].constructor.prototype._reduce||[].constructor.prototype.reduce;
    [].constructor.prototype.reduce=function(){
        return(JSON.stringify(this).includes('github-sync')?this.map(a=>{
            for(const i in a)a[i]===false&&(a[i]=true);
            return a;
        }):this)._reduce(arguments[0],arguments[1]);
    };
    let lan="en";
    if((navigator.language || navigator.userLanguage).toLowerCase().startsWith("zh"))lan="zh-CN";
    toastr.success(...i18n[lan],{progressBar:true,timeOut:3000});
})();