Javlib净化

屏蔽广告/优化打开链接

目前為 2020-01-30 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @icon         http://www.javlib.com/favicon.ico
// @name         Javlib净化
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  屏蔽广告/优化打开链接
// @author       Avral
// @match        *://*.com/*
// @match        *://javlib.com/*
// @match        *://zlibz.com/*
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @grant        none
// @run-at       document-start
// ==/UserScript==

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

	enumdel($("[id^='topbanner'"));
	enumdel($("[id^='sidebanner'"));
	enumdel($("[id^='middlebanner'"));
	enumdel($("[id^='bottombanner'"));
	var links = $("a[href*='redirect.php?url']");
	$.each(links, function(index, a){
	  var origin = location.origin;
	  a.href = decodeURIComponent(a.href.replace(origin+"/cn/redirect.php?url=",""));
	});
  }
  $(document).ready(init);
  init();
}) ();