Skip to content

Instantly share code, notes, and snippets.

@hiway
Created January 10, 2013 06:04
Show Gist options
  • Save hiway/4499802 to your computer and use it in GitHub Desktop.
Save hiway/4499802 to your computer and use it in GitHub Desktop.
Disable Autoplaying Youtube Advertisements on JustDial
// ==UserScript==
// @name Disable Autoplaying Youtube Advertisements on JustDial
// @namespace http://www.justdial.com
// @description Removes annoying advertisements.
// @include *.justdial.com/*
// ==/UserScript==
var yt_iframe = document.getElementById('adif');
var parent = yt_iframe.parentNode;
parent.removeChild(yt_iframe);
var ad_tabs = document.getElementsByClassName('jad');
for(i=0; i<ad_tabs.length; i++){
ad_tab = ad_tabs[i];
ad_tab.parentNode.removeChild(ad_tab);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment