Javlib(图书馆) 净化

屏蔽广告/优化打开链接

20.01.2021 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @icon         http://www.javlib.com/favicon.ico
// @name         Javlib(图书馆) 净化
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  屏蔽广告/优化打开链接
// @author       Avral
// @match        *://*.com/*
// @match        *://javlib.com/*
// @match        *://zlibz.com/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function () {
  function enumdel(arrs){
	$.each(arrs, function(index, a){
	  a.remove();
	});
  }
  function init(){
	if (document.title.indexOf("JAVLibrary") == -1)return;
	console.log("Initing...");
	/*var $videoimages = null;
	document.onselect = function(){}
	document.onclick = function(){}
	document.onmousedown = function(){}
	document.onmouseup = function(){}
	document.write = function(){}
	document.writeln = function(){}*/
	window.open = function(){};

	enumdel($("[id^='topbanner'"));
	enumdel($("[id^='sidebanner'"));
	enumdel($("[id^='middlebanner'"));
	enumdel($("[id^='bottombanner'"));
	$("table.comment a[href*='redirect.php?url']").each(function(index, a){
	  var origin = location.origin;
	  a.href = decodeURIComponent(a.href.replace(origin+"/cn/redirect.php?url=",""));
	  $.ajax({
		url: a.href,
		type: 'GET',
		dataType: "jsonp",
		complete: (response)=>{
		  if(response.status==200){
			a.innerHTML = "(有效)"+a.innerHTML;
			return;
		  }
		  a.innerHTML = "(已失效)"+a.innerHTML;
		}
	  });
	});
	$("div.videos div.id").each(function(index, a){
	  $.ajax({
		url:"http://127.0.0.1:8999/" + a.innerHTML,
		type: "POST",
		data:{},
		success: function (result) {
		  a.innerHTML += result;
		}
	  });
	});
	$("div#video_id td.text").each(function(index, a){
	  $.ajax({
		url:"http://127.0.0.1:8999/" + a.innerHTML,
		type: "POST",
		data:{},
		success: function (result) {
		  a.innerHTML += result;
		}
	  });
	});
  }
  /*$(document).ready(function(){
	init();
  });*/
  init();
}) ();