NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name bongacamsKillAds // @description Kill ads & banners & frames // @version 2.0 // @author Max Max // @license MIT // @include http://*.bongacams.com/ // @include http://*.bongacams.com/* // @include https://*.bongacams.com/ // @include https://*.bongacams.com/* // @match http://*.bongacams.com/ // @match http://*.bongacams.com/* // @match https://*.bongacams.com/ // @match https://*.bongacams.com/* // @icon http://i57.tinypic.com/34rje3t.png // @run-at document-end // @grant none // ==/UserScript== if(window.self!=window.top){return;}if(!window.location.href.match(/bongacams\.com/)){return;}if(!document.getElementById('header')){return;} var banner,popup,p,t="",reg=false;function ce(a){return document.createElement(a)}function gebid(a){return document.getElementById(a)}function rebid(b){var a=document.getElementById(b);if(a){a.parentNode.removeChild(a)}}function addStyle(b){var a=document.head||document.getElementsByTagName("head")[0];if(a){var c=document.createElement("style");c.type="text/css";c.appendChild(document.createTextNode(b));a.appendChild(c)}}function _NodesByXPath(a){return document.evaluate(a,document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null)}function _NodeByXPath(a){return _NodesByXPath(a).snapshotItem(0)}function _removeElByPath(a){var d=_NodesByXPath(a);if(d.snapshotLength>0){for(var b=0;b<d.snapshotLength;b++){var c=d.snapshotItem(b);c.parentNode.removeChild(c)}}}function click(b){var a=document.createEvent("MouseEvents");a.initMouseEvent("click",true,true,window,0,1,1,1,1,false,false,false,false,0,null);b.dispatchEvent(a)}function show_note(e){if(!e){return}var d,b="",a="",c;d=document.getElementById("note");if(d){d.parentNode.removeChild(d)}d=document.createElement("div");c="data:image/gif;base64,R0lGODlhEAAQAJEDAICAgKCgpP///wAAACH5BAEAAAMALAAAAAAQABAAAAIvnI+py70AI3yi2goUEOH2nGxc1QkgInKlqVnBeh5iWcbGto72kF6sJok4hsSiogAAOw==";b="position: absolute;";b+="z-index: 6001;";b+="top: 0;";b+="left: 0;";b+="right: 0;";b+="background: #fde073;";b+="text-align: center;";b+="color:#333;";b+="line-height: 2.5;";b+="overflow: hidden;";b+="—moz—opacity:0.9; —khtml—opacity: 0.9; -webkit-opacity: 0.9; opacity: 0.9;";b+="-webkit-box-shadow: 0 0 5px black; -moz-box-shadow: 0 0 5px black; box-shadow: 0 0 5px black;";a="position: absolute;";a+="right: 10px;";a+="top: 9px;";a+="text-indent: -9999px;";a+="background: url("+c+");";a+="height: 16px;";a+="width: 16px;";a+="cursor: pointer;";d.setAttribute("id","note");d.setAttribute("style",b);d.innerHTML=""+e+' <a id="close" style="'+a+'">[закрыть]</a>';document.body.insertBefore(d,document.body.firstChild);close=document.getElementById("close");close.addEventListener("click",function(){d=document.getElementById("note");if(d){d.parentNode.removeChild(d)}},false)}function addCss(){var a="";a+=".fancybox-wrap, .fancybox-overlay, .fancybox-overlay-fixed { display:none; opacity: 0; -moz-opacity: 0; -webkit-opacity: 0; }";a+=".profile, .profile h2, .profile .title_h2, .profile a, .last_login .title_h2 { color: #111 !important; }";a+=".profile main_block_footer profile_friends_footer, .profile main_block_footer profile_friends_footer { color: #111 !important; }";a+=".gift_wrap_but { color: #111 !important; }";addStyle(a)}function killDinamicAds(a){var b=3000;timerID=setTimeout(function c(){_removeElByPath('//div[@class="fancybox-wrap fancybox-desktop fancybox-type-ajax fancybox-bonga-wrap fancybox-opened"]');_removeElByPath('//div[@class="fancybox-wrap fancybox-desktop fancybox-type-inline fancybox-bonga-wrap fancybox-opened"]');_removeElByPath('//div[@class="fancybox-wrap fancybox-desktop fancybox-type-inline fancybox-opened"]');_removeElByPath('//div[@class="fancybox-wrap fancybox-desktop fancybox-type-ajax fancybox-bonga-wrap fancybox-opened"]');_removeElByPath('//div[@class="fancybox-overlay fancybox-overlay-fixed"]');_removeElByPath('//div[@class="fancybox-loading div"]');rebid("news_im_view");rebid("dmca_security");_removeElByPath('//div[@class="b_container"]');_removeElByPath('//div[@class="banner_top1 bc_promo b_pos"]');_removeElByPath('//div[@class="confirm_email_box"]');_removeElByPath('//div[@class="buy_vip"]');timerID=setTimeout(c,b)},b)}function killStaticAds(){var c;if(!window.location.href.match(/\/live\//)){var a="https://dl.dropboxusercontent.com/s/jxuwhob486gkobp/Decoratorstyle.css",e=document.createElement("link");e.setAttribute("rel","stylesheet");e.setAttribute("type","text/css");e.setAttribute("href",a);document.getElementsByTagName("head")[0].appendChild(e)}if(window.location.href.match(/chat/)){}if(window.location.href.match(/profile/)){document.body.style.backgroundImage="none"}if(window.location.href.match(/bongacams\.com/)){}rebid("dmca_security");rebid("CamsOverlayTootip");var f=_NodesByXPath('//a[@class="snapshot"]');if(f.snapshotLength>0){for(var b=0;b<f.snapshotLength;b++){var d=f.snapshotItem(b);d.setAttribute("target","_blank");d.onclick=function(g){g=g||window.event;if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}}}}}function killFrame(b){for(var a=b.length;a--;){if(b[a]){b[a].parentNode.removeChild(b[a])}}}function isReg(){banner=_NodesByXPath('//div[@class="login logged"]');if(banner.snapshotLength>0){reg=true;console.log("Регистрация ЕСТЬ")}else{reg=false;console.log("Регистрации НЕТ")}show_note("KILL ADS ON!");if(!reg){}else{document.getElementById("note").style.display="none"}}function createMainDiv(){}function createDiv(){}function load(){killStaticAds();createMainDiv();killDinamicAds();createDiv()}addCss();isReg();load();