// ==UserScript== // @name 아프리카TV 도우미 // @name:ko 아프리카TV 도우미 // @namespace // @description 광고 숨김 & 광고 음소거 & 자동 스킵 & 자동 스크린 모드 & VOD 최고화질 // @version 0.2 // @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://greasyfork.org/users/1044223 // @downloadURL none // ==/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"); } } if ($(".btn_smode").find("span")[0].innerText !== "스크린모드 종료(S)") { $(".btn_smode").click(); } }, 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(); })();