azul / osxdaily-ads-remover

// ==UserScript==
// @name        osxdaily-ads-remover
// @namespace   az
// @include     http://osxdaily.com/*
// @version     0.1.0
// @license     MIT
// @author      azul
// @description remove ads on osxdaily.com
// ==/UserScript==

/* remove ads on header */
document.getElementById('tfasyncframe_0').remove()

/* remove amazon ads on right_column */
document.getElementById('bsap_1278263').parentNode.remove()
document.getElementById('tfasyncframe_6').parentNode.parentNode.remove()
document.getElementById('tfasyncframe_7').parentNode.parentNode.remove()
document.getElementById('tfasyncframe_9').parentNode.parentNode.remove()
document.getElementById('tfasyncframe_10').parentNode.parentNode.remove()

/* remove google ads on right column */
const adsbygoogle = document.getElementsByClassName('adsbygoogle')
for (let ad of adsbygoogle) {
  ad.remove()
}

/* remove google ads after content */
const content = document.getElementById("content");
const adContent = content.getElementsByClassName('adsbygoogle')
for (let ad of adContent) {
  ad.remove()
}

/* remove ads on post */
const postAds = document.querySelectorAll('[data-ad-slot]');
for (let ad of postAds) {
  ad.parentNode.parentNode.remove()
}