Guest User

afterdawnbannerfix

a guest
Sep 21st, 2012
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @id             adbannerfix
  3. // @name           AfterDawn Banner Fix
  4. // @description    Fixes the misalignment of AfterDawn's banner when AdBlock is in use
  5. // @include        http*://*.afterdawn.com/*
  6. // @include        http*://*.puhelinvertailu.com/*
  7. // @include        http*://*.download.fi/*
  8. // @include        http*://*.edukas.fi/*
  9. // @run-at         document-end
  10. // ==/UserScript==
  11.  
  12. (function()
  13. {
  14.     var logo, dummy, ad;
  15.     if (logo = document.getElementById('logoHolder'))
  16.     {
  17.         dummy = document.createElement('div');
  18.         dummy.setAttribute('style', 'float: right; margin: 35px 4px 0 0; min-height: 108px; min-width: 734px;');
  19.         logo.parentNode.insertBefore(dummy, logo.nextSibling);
  20.         if (ad = document.getElementById('ad-top-banner-placeholder'))
  21.             ad.setAttribute('style', '');
  22.     }
  23. })();
RAW Paste Data