@@Go by Example中文导航

Go by Example中文导航

目前为 2018-03-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         @@Go by Example中文导航
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Go by Example中文导航
// @author       You
// @match        https://gobyexample.com/*
// @require https://cdn.bootcss.com/jquery/1.12.2/jquery.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var href = window.location.href;
    var cnHref = href.replace('https://gobyexample.com/', 'https://books.studygolang.com/gobyexample/');
    var html = `&nbsp;&nbsp;<a href="${cnHref}" target="_blank">→中文版</a>`;
    $('.example h2').append(html);
})();