Digitalmosesconfidential

From Jimbojw.com

Jump to: navigation, search

// This is a Greasemonkey Userscript. You may choose to install it or download the raw source.

Important! Unless otherwise specified, this userscript is released under The MIT License. If you choose to install it, you do so at your own risk and discretion.

Install this userscript -or- Download raw source
// Digital Moses Confidential Ad removal script
// version 0.1
// 2007-06-15
// Copyright (c) 2007, Jim R. Wilson (http://meopedia.com/en/User:Jimbojw)
// Released under The MIT License (http://www.opensource.org/licenses/mit-license.php)
//
// Purpose:
//    Removes annoying ads from dmconfidential.com
//
// ==UserScript==
// @name          Digital Moses Confidential Ad removal script
// @namespace     http://jimbojw.com/userscripts/
// @description   Removes annoying ads from dmconfidential.com
// @include       http://dmconfidential.com/*
// @include       http://*.dmconfidential.com/*
// ==/UserScript==
 
// Anonymous function wrapper
(function() {
 
/**
 * When the window is finished loading, inject styles.
 */
window.addEventListener('load', function(event) {
 
    // Add a new style node to remove ads through creative targeting
    var style = document.createElement('style');
    style.appendChild(document.createTextNode(
        "body > a > img, \n" +
        "table td + td a img, \n" +
        "table tr + tr + tr a img, \n" +
        "#table1 tr td:first-child div a img, \n" +
        "#table1 td + td + td { \n" +
        "  display: none; \n" +
        "} \n" +
        "#table1 { width: 730; } \n" +
        "#table1 td { width: 25%; } \n" +
        "#table1 td + td { width: 100%; } \n"
    ));
    document.getElementsByTagName('head')[0].appendChild(style);
 
}, 'false');
 
})(); // end anonymous function wrapper