您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove LinkedIn posts labeled as "Suggested" and dynamically observe for new ones
// ==UserScript== // @name Suppress Suggested & Promoted Posts on LinkedIn // @namespace https://example.com/ // @version 1.5 // @description Remove LinkedIn posts labeled as "Suggested" and dynamically observe for new ones // @author JH // @match https://www.linkedin.com/* // @include http://*linkedin.com/* // @include https://*linkedin.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const divTemplate = [ 'div[data-id^="urn:li:activity:"]', // Classic 'article[data-activity-urn^="urn:li:activity:"]' // iOS Safari ]; // Function to hide divs with data-id starting with 'urn:li:activity:' containing spans with 'Promoted' or 'Suggested' function hidePromotedPosts() { divTemplate.forEach(function(template) { const divs = document.querySelectorAll(template); divs.forEach(div => { const spans = div.querySelectorAll('span, p'); // Look for spans within these divs spans.forEach(span => { if (span.textContent.trim() === 'Promoted' || span.textContent.trim() === 'Suggested') { div.style.display = 'none'; // Hide the entire div } }); }); }); } // Call the function to hide the promoted and suggested posts hidePromotedPosts(); // Run the function when new posts are loaded (using a MutationObserver) const observer = new MutationObserver(hidePromotedPosts); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址