您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Optimize work experience at Microsoft!
当前为
// ==UserScript== // @name Optimize work experience at Microsoft // @namespace https://www.microsoft.com/ // @version 1.0.0 // @description Optimize work experience at Microsoft! // @author Guosen Wang // @match https://ms.portal.azure.com/* // @match https://*.visualstudio.com/* // @match https://m365pulse.microsoft.com/* // @match https://eng.ms/docs/* // @run-at document-start // @grant none // ==/UserScript== (function () { 'use strict'; const host = location.host; switch (true) { case 'ms.portal.azure.com' === host: azure(); break; case 'm365pulse.microsoft.com' === host: m365pulse(); break; case 'eng.ms' === host: eng_ms(); break; case ["developercommunity", "vssps"].indexOf(host.match(/([^\.]+).visualstudio.com/)[1].toLowerCase()) == -1: vsts(); break; } })(); function azure() { let checkExist = setInterval(function () { const selector = '#_weave_e_6'; if (document.querySelector(selector)) { document.querySelector(selector).remove(); const bannerLabel = document.querySelector("#_weave_e_5 > div.fxs-topbar-internal.fxs-internal-full"); bannerLabel.innerText = bannerLabel.innerText.replace(" (Preview)", ""); clearInterval(checkExist); } }, 100); setTimeout(() => { clearInterval(checkExist); }, 5000); } // Redirect VSTS to DevOps function vsts() { let url = location.href.replace(/(\w+)\.visualstudio.com(\/DefaultCollection)?/, 'dev.azure.com/$1'); location.replace(url); } function m365pulse() { // Remove the "New Version" link let checkExist_NewVersionLink = setInterval(function () { const newVersionLink = document.querySelector('a.right:nth-child(1)'); if (newVersionLink) { if (newVersionLink.innerText === 'New Version') { newVersionLink.remove(); } clearInterval(checkExist_NewVersionLink); } }, 100); setTimeout(() => { clearInterval(checkExist_NewVersionLink); }, 5000); } function eng_ms() { const style = document.createElement("style"); style.textContent = ".docfx-container pre{line-height:0;}"; document.head.appendChild(style); }