V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yuanfnadi
V2EX  ›  分享发现

一键切换 kubernetes 官方文档到中文版

  •  
  •   yuanfnadi · 2018-03-08 22:32:12 +08:00 · 1379 次点击
    这是一个创建于 2240 天前的主题,其中的信息可能已经有所发展或是发生改变。

    油猴子脚本

    // ==UserScript==
    // @name         Kubernetes Doc to cn
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://kubernetes.io/*
    // @match        https://k8smeetup.github.io/*
    // @grant        none
    // ==/UserScript==
    
    
    
    (function() {
        'use strict';
        if(document.URL.match("kubernetes.io")){
            document.querySelector('body > header > a').href=document.URL.replace("kubernetes.io","k8smeetup.github.io");
        }else{
            document.querySelector('body > header > a').href=document.URL.replace("k8smeetup.github.io","kubernetes.io");
        }
    })();
    
    
    
    4 条回复    2018-03-09 22:13:18 +08:00
    ifaii
        1
    ifaii  
       2018-03-08 22:43:34 +08:00
    没有效果
    yuanfnadi
        2
    yuanfnadi  
    OP
       2018-03-08 23:16:04 +08:00
    @ifaii 油猴子里设置好。想看中文文档点左上角点图标就可以了。再点一下切回来
    yuanfnadi
        3
    yuanfnadi  
    OP
       2018-03-09 17:51:52 +08:00
    yuanfnadi
        4
    yuanfnadi  
    OP
       2018-03-09 22:13:18 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1402 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:34 · PVG 01:34 · LAX 10:34 · JFK 13:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.