Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name cleangoogle
- // @namespace https://www.google.com/
- // @include https://www.google.com/*
- // @include http://www.google.com/*
- // @version 1.0.1
- // ==/UserScript==
- (function () {
- function getElementsById(id) {
- return document.querySelectorAll("[id='" + id + "']");
- }
- var spam_text = 'spam'
- var spam_style = "font-size: 0.5em; color: #d0d0d0; border: 1px dashed #d0d0d0;padding: 0px;"
- var center_col = document.getElementById('center_col');
- if (center_col) {
- center_col.setAttribute('style', 'padding-top: 0px;');
- }
- // ids to hide
- var hideme = new Array('tads', 'rhs_block');
- for ( var x = 0; x < hideme.length; x++ ) { // loop thru the hide id array
- var ids = getElementsById(hideme[x]);
- for ( var i = 0; i < ids.length; i++ ) { // loop thru the ids
- // ids[i].style['display'] = 'none'; // set the element not to show
- ids[i].innerHTML = spam_text;
- ids[i].setAttribute('style', ids[i].style.cssText + ";" + spam_style);
- }
- }
- })();
Add Comment
Please, Sign In to add comment