Created
February 3, 2013 16:07
-
-
Save flexoid/4702311 to your computer and use it in GitHub Desktop.
Удаляет обрамляющую рекламу на кинопоиске, и несколько баннеров.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kinopoisk Promo Disabler | |
// @version 0.1 | |
// @author flexoid | |
// @description Makes kinopoisk page cleaner | |
// @match http://*.kinopoisk.ru/* | |
// ==/UserScript== | |
var body = document.getElementsByTagName("body")[0]; | |
body.removeAttribute("style"); | |
var unneeded_elements = ["promo_player_container", | |
"branding_flash", "top_superbanner", "show_adv", "hide_adv"]; | |
for (var i = 0; i < unneeded_elements.length; i++) { | |
var element = document.getElementById(unneeded_elements[i]); | |
if (element) | |
element.parentNode.removeChild(element); | |
} | |
var top_3banner = document.getElementById('top_3banners'); | |
if (top_3banner) | |
top_3banner.removeAttribute("style"); | |
var links = document.getElementsByTagName("link"); | |
for (var i = 0; i < links.length; i++) { | |
if (links[i].getAttribute("href").match(/\/brand\.css/)) { | |
links[i].parentNode.removeChild(links[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment