Skip to content

Instantly share code, notes, and snippets.

@abjugard
Last active May 6, 2025 17:34
Show Gist options
  • Select an option

  • Save abjugard/62b7b4337d2e77f8a3abbfc3efcc65b9 to your computer and use it in GitHub Desktop.

Select an option

Save abjugard/62b7b4337d2e77f8a3abbfc3efcc65b9 to your computer and use it in GitHub Desktop.
MacRumors filter
// ==UserScript==
// @name Remove useless articles on MacRumors
// @namespace https://github.com/abjugard/
// @version 0.8
// @description Removes promos on MacRumors
// @author Adrian Bjugård
// @match https://www.macrumors.com/*
// @icon https://www.google.com/s2/favicons?domain=macrumors.com
// @grant none
// @updateURL https://gist.github.com/abjugard/62b7b4337d2e77f8a3abbfc3efcc65b9/raw/macrumors-filter.user.js
// @downloadURL https://gist.github.com/abjugard/62b7b4337d2e77f8a3abbfc3efcc65b9/raw/macrumors-filter.user.js
// ==/UserScript==
const unwantedRes = [
/deal(s|):/i,
/Apple Releases (New |)(Beta |)Firmware.*(AirPod|AirTag|Remote|Display|[Bb]eats|MagSafe Charger)(s|)/i,
/Apple Releases (New |)(Beta |)(AirPod|AirTag|Remote|Display|[Bb]eats|MagSafe Charger)(s|).*Firmware/i,
/Apple Seeds.*Beta.*OS.*Developers/i
];
(function() {
'use strict';
document.querySelectorAll('article').forEach(article => {
const title = article.querySelector('div[class^="titlebar--"]')?.innerText;
if (unwantedRes.some(re => re.test(title))) {
article.parentNode.removeChild(article);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment