아프리카TV 도우미

광고 숨김 & 광고 음소거 & 자동 스킵 & 자동 스크린 모드 & VOD 최고화질

目前為 2023-03-18 提交的版本,檢視 最新版本

// ==UserScript==
// @name         아프리카TV 도우미
// @name:ko      아프리카TV 도우미
// @namespace
// @description  광고 숨김 & 광고 음소거 & 자동 스킵 & 자동 스크린 모드 & VOD 최고화질
// @version      0.1
// @match        *://vod.afreecatv.com/player/*
// @match        *://play.afreecatv.com/*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=afreecatv.com
// @run-at       document-end
// @grant        none
// @namespace https://gf.qytechs.cn/users/1044223
// ==/UserScript==
(function () {
	var $ = window.jQuery;
	function waitForElement(elementPath, callBack) {
		window.setTimeout(function () {
			if ($(elementPath).length) {
				callBack(elementPath, $(elementPath));
			} else {
				waitForElement(elementPath, callBack);
			}
		}, 500);
	}
	waitForElement("button.da_area_right", function () {
		var myInterval = setInterval(function () {
			if ($("button.da_area_right").is(":visible")) {
				if (isNaN(Number($("button.da_area_right").find("em")[0].innerText))) {
					$("button.da_area_right").click();
					setTimeout(function () {
						if ($("#btn_sound").hasClass("mute")) {
							$("#btn_sound").click();
							$(".btn_smode").click();
                            $(".thumb").remove();
						}
					}, 500);
					clearInterval(myInterval);
				} else if (!$("#btn_sound").hasClass("mute")) {
					$("#btn_sound").click();
                    $('#da_video.af_video').css('display', 'none');
                    $('.ti_in').remove();
				}
			}
		}, 500);
	});
	if (window.location.hostname == "vod.afreecatv.com") {
		waitForElement("#afreecatv_player", function () {
			$('button[name="play"]').each(function () {
				$(this).click();
			});
			$("span.bg").each(function () {
				$(this).click();
			});
		});
		waitForElement("#quality_levels > li:nth-child(2) > button", function () {
			setTimeout(function () {
				$("#quality_levels > li:nth-child(2) > button").click();
			}, 500);
		});
	}
	$("#header_ad").remove();
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址