debiholic / Nonton Serial Clear Ads

// ==UserScript==
// @name        Nonton Serial Clear Ads
// @namespace   http://dino.web.id
// @description Cleaning ads
// @include     http://www.nontonserial.com/*
// @version     1
// @grant       none
// ==/UserScript==

var previewBox = document.getElementById('previewBox');
var previewBox2 = document.getElementById('previewBox2');
var previewBox3 = document.getElementById('previewBox3');
var previewBox4 = document.getElementById('previewBox4');
var fatas = document.getElementById('fatas');
var fbawah = document.getElementById('fbawah');
var sidebar = document.getElementById('sidebar');
var hapus;

/* remove all iframes (ads) */ 
	hapus = document.getElementsByTagName('iframe');
	for (i=0 ; i<hapus.length; i++){
		hapus[i].src = '';
		hapus[i].style.display='none';
		hapus[i].outerHTML = '';
	}

if (previewBox) {
  previewBox.parentNode.removeChild(previewBox);
}

if (previewBox2) {
  previewBox2.parentNode.removeChild(previewBox2);
}

if (previewBox3) {
  previewBox3.parentNode.removeChild(previewBox3);
}

if (previewBox4) {
  previewBox4.parentNode.removeChild(previewBox4);
}

if (fatas) {
  fatas.parentNode.removeChild(fatas);
}

if (fbawah) {
  fbawah.parentNode.removeChild(fbawah);
}

if (sidebar) {
  sidebar.parentNode.removeChild(sidebar);
}

var divAdsns = document.evaluate('//div[@class="adsns"]', document, 
null, typeXPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; 
if (divAdsns) { 
   divAdsns.style.display = "none"; 
} else { /*complain*/ } 

var divBan = document.evaluate('//div[@class="ban_empat"]', document, 
null, typeXPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; 
if (divBan) { 
   divBan.style.display = "none"; 
} else { /*complain*/ }