// ==UserScript== // @name ABPVN AdsBlock // @namespace ABPVN // @author Hoàng Rio // @homepage http://abpvn.com // @icon http://abpvn.com/icon.png // @description Script chặn quảng cáo,Bypass Oni.vn,Bypass Wait Fshare.vn của ABPVN, // @include http://* // @include https://* // @version 1.2.1 // @grant none // @downloadURL none // ==/UserScript== function FshareSkip() { var speed = $(this).data('speed'); var data = { speed: speed, fs_csrf: '881ea40f9ce9a031f5ed40f409222eb0b66bda6f' }; $.post('/download/index', data).done(function (data, statusText, xhr) { window.location = data.url; }) } function cTitle() { document.title = document.title + " - ABPVN"; } function ByPassOnivn() { var script = $("script").text(); var data = script.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 (html) { $('input[name=linknexttop]').val(2); window.location = html; } }) } else { console.info("ABPVN: Đây chắc là trang chủ oni.vn rồi. =))"); } } (function ABPVNAdsBlock() { var url = this.location.href; //Chặn popup quảng cáo không chặn được bằng ABP var popup_ar = ['http://blogtruyen.com']; for (var i = 0; i < popup_ar.length; i++) { if (url.indexOf(popup_ar[i]) === 0) { cTitle(); console.info("ABPVN: Đã chặn popup quảng cáo"); document.body.onclick = function () { //Function rỗng gỡ bỏ popup }; } } //Chặn background quảng cáo 24h if (url.indexOf('http://www.24h.com.vn') === 0) { console.info("ABPVN: Đã xóa background quảng cáo"); cTitle(); document.body.style.background = "white"; } if (url.indexOf('http://www.oni.vn') === 0) { cTitle(); ByPassOnivn(); } if (url.indexOf('https://www.fshare.vn/file') === 0) { console.info("ABPVN: Download fshare không cần đợi"); cTitle(); FshareSkip(); } })();