Greasy Fork is available in English.
Script chặn quảng cáo,Bypass Oni.vn,Bypass Wait Fshare.vn của ABPVN
当前为
// ==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.6
// @grant none
// ==/UserScript==
function FshareSkip() {
var scripttext=$("script").text();
var temp1=''+scripttext.match(/'.*'\n/);
var temp2=temp1.replace("'","");
var temp3=temp2.replace(/\n/g,"");
var code=temp3.replace("'","");
var speed = $(this).data('speed');
var data = {
speed: speed,
fs_csrf: code
};
$.post('/download/index', data).done(function (data, statusText, xhr) {
window.location = data.url;
}).fail(function(xhr, statusText, error){
$.alert({success: false, message: "ABPVN: Không thể hoạt động với file có pass"});
});
}
function cTitle() {
document.title = document.title + " - ABPVN";
}
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 (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) {
$.alert({success: false, message: "ABPVN: Download fshare không cần đợi"});
cTitle();
FshareSkip();
}
})();