Greasy Fork is available in English.

ABPVN AdsBlock

Script chặn quảng cáo,Bypass Oni.vn,Bypass Wait Fshare.vn của ABPVN

2015-04-30 일자. 최신 버전을 확인하세요.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
  1. // ==UserScript==
  2. // @name ABPVN AdsBlock
  3. // @namespace ABPVN
  4. // @author Hoàng Rio
  5. // @copyright ABPVN
  6. // @homepage http://abpvn.com
  7. // @icon http://abpvn.com/icon.png
  8. // @description Script chặn quảng cáo,Bypass Oni.vn,Bypass Wait Fshare.vn của ABPVN
  9. // @include http://*
  10. // @include https://*
  11. // @version 1.4.5
  12. // @grant none
  13. // ==/UserScript==
  14. function urlStart(str){
  15. var url=this.location.href;
  16. if(url.indexOf(str)===0) return true;
  17. return false;
  18. }
  19. function AntiHayhaytv(){
  20. $('head').append('<script src="https://cdn.hostjs.tk/hayhay_abpvn.js"></script>');
  21. }
  22. function FshareSkip() {
  23. var scripttext=$("script").text();
  24. var temp1=''+scripttext.match(/'.*'\n/);
  25. var temp2=temp1.replace("'","");
  26. var temp3=temp2.replace(/\n/g,"");
  27. var code=temp3.replace("'","");
  28. var speed = $(this).data('speed');
  29. var data = {
  30. speed: speed,
  31. fs_csrf: code
  32. };
  33. $.post('/download/index', data).done(function (data, statusText, xhr) {
  34. window.location = data.url;
  35. }).fail(function(xhr, statusText, error){
  36. $.alert({success: false, message: "ABPVN: Đã có lỗi fshare hoặc file có password"});
  37. });
  38. }
  39. function cTitle() {
  40. document.title = document.title + " - ABPVN";
  41. }
  42. function ByPassOnivn() {
  43. var scripttext = $("script").text();
  44. var data = scripttext.match(/code=.*\b/);
  45. var domain = window.location.protocol + "//" + window.location.host + '/';
  46. var urls = $('input[name=linknexttop]').val();
  47. if (urls == 1) {
  48. url = '';
  49. $.ajax({
  50. type: "GET",
  51. url: domain + "click.html",
  52. data: "" + data + "",
  53. contentType: "application/json; charset=utf-8",
  54.  
  55. success: function (html) {
  56. $('input[name=linknexttop]').val(2);
  57. window.location = html;
  58. }
  59. })
  60. } else {
  61. console.info("ABPVN: Đây chắc là trang chủ oni.vn rồi. =))");
  62. }
  63. }
  64. (function ABPVNAdsBlock() {
  65.  
  66. //Chặn popup quảng cáo không chặn được bằng ABP
  67. var popup_ar = ['http://blogtruyen.com'];
  68. for (var i = 0; i < popup_ar.length; i++) {
  69. if (urlStart(popup_ar[i])) {
  70. cTitle();
  71. console.info("ABPVN: Đã chặn popup quảng cáo");
  72. document.body.onclick = null;
  73. }
  74. }
  75. //Chặn background quảng cáo 24h
  76. if (urlStart('http://www.24h.com.vn')) {
  77. console.info("ABPVN: Đã xóa background quảng cáo");
  78. cTitle();
  79. document.body.style.background = "white";
  80. }
  81. if (urlStart('http://www.oni.vn')) {
  82. cTitle();
  83. ByPassOnivn();
  84. }
  85. if (urlStart('https://www.fshare.vn/file')) {
  86. $.alert({success: false, message: "ABPVN: Download fshare không cần đợi"});
  87. cTitle();
  88. FshareSkip();
  89. }
  90. if(urlStart('http://www.hayhaytv.vn')){
  91. console.info('ABPVN: Anti hayhaytv.vn');
  92. cTitle();
  93. AntiHayhaytv();
  94. }
  95. })();