废柴视频网显示下载链接

显示下载链接,修改下载视频按钮,顺便去广告

// ==UserScript==
// @name         废柴视频网显示下载链接
// @namespace    https://sleazyfork.org/zh-CN/users/193133-pana
// @version      2.1.0
// @description  显示下载链接,修改下载视频按钮,顺便去广告
// @author       pana
// @include      http*://*fcww95.com/*
// @include      http*://*fcww10.com/*
// @include      http*://*fcww9.com/*
// @include      http*://*fcww8.com/*
// @include      http*://*xinfcw.net/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	const adUrlReg = /[\d]+\.com/i;
	$('div#layui-layer1').remove();
	$('div#layui-layer-shade1').remove();
	$('div.content:eq(0)').remove();
	$('div.list-videos div.item a img.thumb.lazy-load').each(function() {
		this.src = $(this).attr('data-original')
	});
	$('div.list-videos:first div.item:lt(2)').each(function() {
		if (adUrlReg.test($(this).find('a').attr('title'))) {
			$(this).remove()
		}
	});
	$('span.dmcenterb').remove();
	$('div.all960').remove();
	$('div.info div').each(function() {
		this.style.display = ''
	});
	let videosLink = $('div.info div.item:last a').attr('href');
	if (videosLink) {
		$('a.toggle-button:contains("下载视频")').removeAttr('onclick').attr('href', videosLink)
	}
	$('.item.private .thumb, .block-video .no-player img').css('opacity', '1.0');
	$('cloudflare-app').remove();
	try {
		let observer = new MutationObserver(function() {
			$('cloudflare-app').remove()
		});
		let listenerContainer = document.querySelector("body");
		let option = {
			'childList': true,
			'subtree': true
		};
		observer.observe(listenerContainer, option)
	} catch (e) {
		console.log(e)
	}
})();