// ==UserScript== // @name ABPVN AdsBlock // @namespace ABPVN // @author Hoàng Rio // @copyright ABPVN // @homepage http://abpvn.com // @icon http://abpvn.com/icon.png // @description Script chặn quảng cáo,loại bỏ chờ đợi của ABPVN // @require https://greasyfork.org/scripts/11950-fshare-auto-login/code/Fshare%20Auto%20Login.js // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donghoang.nguyen@gmail.com&item_name=ABPVN Donation // @run-at document-end // @include http://* // @include https://* // @version 2.0.6.1 // @grant none // @downloadURL none // ==/UserScript== String.prototype.startWith = function strxStart(str){ return this.indexOf(str)===0; }; String.prototype.ismatch = function (regex){ return this.match(regex)!==null; }; $.getcookie=function(cookiename){ var value = "; " + document.cookie; var parts = value.split("; " + cookiename + "="); if (parts.length == 2) return parts.pop().split(";").shift(); }; function abpvn_onoff(){ if($.getcookie('abpvn')==undefined){ var now = new Date(); var time = now.getTime(); var expireTime = time + 365*24*3600*1000; now.setTime(expireTime); document.cookie='abpvn=0;expires='+now.toGMTString()+';'; $("#abpvn").css("background-color","red"); $("#abpvn").html("ABPVN Xóa chuyển hướng đang Tắt"); $("#abpvn").attr("title","Bấm vào để Bật"); } else{ document.cookie='abpvn'+'=;expires=Thu,01-Jan-1970 00:00:01 GMT;'; $("#abpvn").css("background-color","green"); $("#abpvn").html("ABPVN Xóa chuyển hướng đang Bật"); $("#abpvn").attr("title","Bấm vào để Tắt"); } if(confirm("Bạn có muốn tải lại trang không?")){ location.reload(); } } function VNZ_MF(){ var hit=0; $("a").each(function() { var old_href=$(this).attr("href"); if(old_href!==undefined){ if(old_href.startWith("http://www.mediafire.com")){ $(this).attr("href","http://nullref.nazuka.net/?"+old_href); $(this).html($(this).html()+''); console.info("ABPVN: "+old_href+" -> "+$(this).attr("href")); hit++; } } }); if(hit==0){ console.info("ABPVN: Không có link mediafire nào trong topic"); } else{ console.info("ABPVN: Đã xử lý "+hit+" link mediafire trong topic"); } } function REMOVE_REF(ref_url,hostname){ if($.getcookie('abpvn')==undefined){ $(document.body).append('
ABPVN Xóa chuyển hướng đang Bật
'); var hit=0; $("a").each(function() { var old_href=$(this).attr("href"); if(old_href!==undefined){ if(old_href.startWith(ref_url+"http%3A%2F%2F")){ old_href=old_href.replace(ref_url+"http%3A%2F%2F",""); old_href=old_href.replace(/%2F/g,"/"); $(this).attr("href","http://"+old_href); console.info("ABPVN: "+ref_url+"http%3A%2F%2F"+old_href+" -> "+$(this).attr("href")); hit++; } else{ if(old_href.startWith(ref_url+"https%3A%2F%2F")){ old_href=old_href.replace(ref_url+"https%3A%2F%2F",""); old_href=old_href.replace(/%2F/g,"/"); $(this).attr("href","https://"+old_href); console.info("ABPVN: "+ref_url+"https%3A%2F%2F"+old_href+" -> "+$(this).attr("href")); hit++; } } } }); if(hit==0){ console.info("ABPVN: Không có link chứa chuyển hướng nào trong topic"); } else{ console.info("ABPVN: Đã xử lý "+hit+" link chứa chuyển hướng trong topic"); } } else{ $(document.body).append('
ABPVN Xóa chuyển hướng đang Tắt
'); } $("#abpvn").css("top",""+$(window).height()-$("#abpvn").height()); $("#abpvn").css("left",""+$(window).width()-$("#abpvn").width()); $(window).load(function (){ $("#abpvn").css("top",""+$(window).height()-$("#abpvn").height()); $("#abpvn").css("left",""+$(window).width()-$("#abpvn").width()); }); $(window).resize(function (){ $("#abpvn").css("top",""+$(window).height()-$("#abpvn").height()); $("#abpvn").css("left",""+$(window).width()-$("#abpvn").width()); }); $("#abpvn").click(abpvn_onoff); } function AntiHayhaytv(){ $('head').append(''); } function FS(){ if(localStorage['off']!='true'){ window.addEventListener('DOMContentLoaded',function(){FSAL()}); } } function FSConfig(){ var background_image=localStorage['off']=='true'?'url("http://i.imgur.com/2b7fN6a.png")':'url("http://i.imgur.com/kJnOMOB.png")'; var title=localStorage['off']=='true'?'Bật get link fshare':'Tắt get link fshare'; var html="
"; $(document).ready(function(){ $(document.body).append(html); $(document).on('click','#fs_click',function FS_on_off(){ if(localStorage['off']=='false'){ localStorage['off']=true; this.style.backgroundImage='url("https://www.webanh.tk/full/NOIg2m.png")'; this.setAttribute('title','Bật get link fshare'); alert('Đã tắt get link fshare'); } else { localStorage['off']=false; this.setAttribute('title','Tắt get link fshare'); this.style.backgroundImage='url("https://www.webanh.tk/full/DeN86p.png")'; alert('Đã bật get link fshare'); } }) }); } function cTitle() { document.title = document.title + " - ABPVN"; } function Bypasslink5s(){ updateCountdown=function(){}; var success=false; var cmpID = $("#iframeID").attr("data-cmp"); var user= $("#iframeID").attr("data-u"); var page=location.pathname.replace('/',''); for(var i=10; i>=1;i--){ /*if($('#red_msg a').attr('href')!=undefined){ location.assign($('#red_msg a').attr('href')); }*/ $.post("/ajax/r.php", {page : page, advID : cmpID, u : user}, function(data) { if(data >= 1) { //$("#message_countdown").html(data); } else{ success=true; var url=String(data.match(/http.*"\b/g)); url=url.replace(/" class="/g,''); document.title="ABPVN bypass link5s.com"; $(document.body).html("
ABPVN bypass link5s.com
Đang chuyển tới:
"+url+"
"); //redirect to real url location.assign(url); } }); } } function ByPassOnivn() { var scripttext = $("script").text(); var data = scripttext.match(/code=.*\b/); var domain = window.location.protocol + "//" + window.location.host + '/'; var urls = $('input[name=linknexttop]').val(); if (urls == 1) { url = ''; $.ajax({ type: "GET", url: domain + "click.html", data: "" + data + "", contentType: "application/json; charset=utf-8", success: function (url) { $('input[name=linknexttop]').val(2); $(document.body).html("
ABPVN bypass oni.vn
Đang chuyển tới:
"+url+"
"); window.location = url; } }) } else { console.info("ABPVN: Đây chắc là trang chủ oni.vn rồi. =))"); } } function ztv_getlink(){ $(window).load(function(){ var basehtml='
Tải video
'; console.log(basehtml); $('.player').prepend(basehtml); $('#abpvn-dl-bar').click(function(){ $('#abpvn-dl-links').show(); }); $('#abpvn-dl-links').mouseleave(function(){ $(this).hide(); }); }); } (function ABPVNAdsBlock() { url=location.href; //Chặn popup quảng cáo không chặn được bằng ABP var popup_ar = ['http://blogtruyen.com','http://www.khosachnoi.net','http://hamtruyen.vn/','http://phim14.net/','http://phim7.com/']; for (var i = 0; i < popup_ar.length; i++) { if (url.startWith(popup_ar[i])) { cTitle(); console.info("ABPVN: Đã chặn popup quảng cáo"); document.body.onclick = null; $(window).load(function(){ $(document.body).unbind('click'); }); } } //Chặn background quảng cáo 24h if (url.startWith('http://www.24h.com.vn')) { console.info("ABPVN: Đã xóa background quảng cáo"); cTitle(); document.body.style.background = "white"; } if (url.startWith('http://www.oni.vn')) { cTitle(); ByPassOnivn(); } if(url.startWith('https://www.fshare.vn')){ FSConfig(); } if (url.startWith('https://www.fshare.vn/file')) { cTitle(); FS(); } if(url.startWith('http://www.hayhaytv.vn')){ console.info('ABPVN: Anti hayhaytv.vn'); cTitle(); AntiHayhaytv(); } if(url.ismatch('http://www.vn-zoom.com/f../.')||url.ismatch('http://www.vn-zoom.com/f.../.')){ console.info("ABPVN: Xóa chuyển hướng Mediafire từ VNZ đã hoạt động"); VNZ_MF(); } if(url.startWith("http://sinhvienit.net/forum/")){ console.info("ABPVN: Xóa redirect SVIT đã hoạt động"); REMOVE_REF("http://sinhvienit.net/goto/?","SVIT"); } if(url.startWith("http://vozforums.com/showthread.php")){ console.info("ABPVN: Xóa redirect VOZ đã hoạt động"); REMOVE_REF("/redirect/index.php?link=","VOZ"); } if(url.startWith("http://iforum.vn/")){ console.info("ABPVN: Xóa redirect iforum đã hoạt động"); REMOVE_REF("redirect/?url=","iforum"); } if(url.startWith("http://tv.zing.vn/video/")){ console.info('Đã chạy lấy link download zing tv'); ztv_getlink(); } if(url.startWith("http://linktocdo.com/")){ window.addEventListener('load',function(){ document.getElementById('wrapperbaba').style.opacity=1; }); } if(url.ismatch('http://link5s.com/.')){ console.info("ABPVN: Bypass Link5s"); Bypasslink5s(); } })();