您需要先安装一个扩展,例如 篡改猴、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/*
- // @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 ["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);
- // Remove feedback widget
- let checkExist_FeedbackWidget = setInterval(function () {
- const feedbackWidget = document.querySelector('div[class^="feedback-"]');
- if (feedbackWidget) {
- feedbackWidget.parentElement.remove();
- clearInterval(checkExist_FeedbackWidget);
- }
- }, 100);
- setTimeout(() => {
- clearInterval(checkExist_FeedbackWidget);
- }, 10000);
- }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址