// ==UserScript==
// @name           VIPNoBanner
// @author         Kasza Zsolt - http://kaszazsolt.hu
// @description    myVIP reklámmentesítő
// @version        1.6 - Opera böngészőhöz
// @include        http://myvip.com/*
// @include        http://myvip.hu/*
// ==/UserScript==

// Hátha... ;)
window.opera.defineMagicVariable('logged_nobanner', function () {return 1;}, null );

document.addEventListener('load', function (e) {
// Reklám menüpont (Szonár, Szőrtelenítés, Fociizé, stb...)
  var s1 = '';
  var d = document.getElementsByTagName('a');
  for(var i = 0; i < d.length; i++) {
    s1 = d[i].href;

    // Reklámok a menükben
    if(s1.indexOf('http://myvip.com/adclick.php') == 0) d[i].parentNode.setAttribute('style', 'display: none;');
    if(s1.indexOf('http://myvip.hu/adclick.php') == 0) d[i].parentNode.setAttribute('style', 'display: none;');
    if(s1.indexOf('http://ad.') == 0) d[i].setAttribute('style', 'display: none;');

    // Álláshirdetések
    if(s1.indexOf('http://www.profession.hu/') == 0) d[i].parentNode.parentNode.parentNode.parentNode.setAttribute('style', 'display: none;');
}

// Másik hirdetés
  d = document.getElementsByTagName('div');
  for(var i = 0; i < d.length; i++) {
    s1 = d[i].getAttribute('class');
    if(s1 == 'banner_side_120 jsbanner') d[i].setAttribute('style', 'display: none;');
    if(s1 == 'header_ad') d[i].setAttribute('style', 'display: none;');
  }

// Windows Live bezárógomb-akármi
  document.getElementById('WL_closebar').setAttribute('style', 'display: none;');

// Alsó csík (frame, infóbár-akármi)
  parent.document.getElementsByTagName('frameset')[0].rows='0, *, 0, 0';
}, false);
