Hide MSN from Bing News

Hide all MSN news results on Bing News search

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Hide MSN from Bing News
// @description  Hide all MSN news results on Bing News search
// @match        *://www.bing.com/news/search?*
// @version 0.0.1.20250330195728
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function() {
    'use strict';

    function removeMSNResults() {
        document.querySelectorAll('.news-card, .newsitem').forEach(card => {
            let url = card.getAttribute('url') || card.getAttribute('data-url') || '';
            if (url.includes('msn.com')) {
                card.remove();
            }
        });
    }

    // Run once on page load
    removeMSNResults();

    // Observe for dynamically loaded content
    const observer = new MutationObserver(() => {
        removeMSNResults();
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();