🏠 Home 

Greasy Fork is available in English.

其乐轮播图广告指示器/keylol ad pointer

受不了其乐在轮播图里插育碧和别的玩意的外链广告,做个指示器免得误点。


安装此脚本?
// ==UserScript==
// @name         其乐轮播图广告指示器/keylol ad pointer
// @namespace    http://tampermonkey.net/
// @version      0.0.3
// @author       [email protected]
// @match        https://keylol.com/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=keylol.com
// @grant        none
// @license      GPLv3
// @description 受不了其乐在轮播图里插育碧和别的玩意的外链广告,做个指示器免得误点。
// ==/UserScript==
(function() {
'use strict';
document.styleSheets[document.styleSheets.length - 1].insertRule(
`.ubi_warn {
position: absolute;
bottom: 32px;
left: 0px;
color: red;
font-weight: bolder;
font-size: 2em;
padding-left: 1em;
width: 100%;
background: rgba(0,0,0,0.6);
}`)
Array.from(document.querySelectorAll('.slideshow a'))
.filter(a_el => !a_el.href.includes('keylol.com') || a_el.querySelector("img").title.includes("活动推广"))
.forEach(a_el => a_el.insertAdjacentHTML('afterend', '<span class="ubi_warn">此条为广告!</span>'))
})();