// ==UserScript== // @name Restore Read in English button // @namespace http://qpwakaba.xyz/ // @version 0.1 // @description Restore the Read in English button at docs.microsoft.com // @author King (qpwakaba) // @match https://docs.microsoft.com/* // @grant none // @run-at document-body // @downloadURL none // ==/UserScript== (function() { 'use strict'; var pageActions = document.getElementById('page-actions'); if (!pageActions) return; if (pageActions.children.length === 0) return; var menu = pageActions.children[0]; var switchLang = document.createElement('li'); switchLang.innerHTML = '
' if (menu.children.length >= 5) { menu.insertBefore(switchLang, menu.children[4]); } else { menu.appendChild(switchLang); } })();