Greasy Fork

Greasy Fork is available in English.

MSDN中英切换

switch Chinese/English language in MSDN

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         MSDN中英切换
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  switch Chinese/English language in MSDN
// @author       dangoron
// @match        http*://msdn.microsoft.com/en-us/*
// @match        http*://msdn.microsoft.com/zh-cn/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var url = location.href;
    var a = document.createElement('span');
    function create_button(){
        var css = 'opacity:0.5;color:black;cursor:pointer;position:fixed;bottom:80%;width:40px;height:40px;right:0px;z-index:9999';
        a.style.cssText = css;
        a.innerHTML ='中/英';
        a.addEventListener('mouseover', function(){ a.style.opacity = 1;}, false);
        a.addEventListener('mouseout', function(){ a.style.opacity = 0.3; }, false);
        a.addEventListener('click', function(){
            if (url.search(/\/en-us\//) != -1){
                window.location.replace(url.replace(/\/en-us\//,'\/zh-cn\/'));
            }
            if (url.search(/\/zh-cn\//) != -1){
                window.location.replace(url.replace(/\/zh-cn\//,'\/en-us\/'));
            }
        }, false );
        document.body.appendChild(a);
    }
    create_button();
})();