remove keqq watermark

remove watermark in keqq

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @include           https://ke.qq.com/*
// @version           0.1.0
// @namespace         keqq.AdBlocker
// @name              remove keqq watermark
// @description       remove watermark in keqq
// @name:zh-CN        移除腾讯课堂水印
// @description:zh-CN 移除腾讯课堂课程中的水印
// ==/UserScript==

;(function () {

    // don't run in iframe
    if (window.top != window.self)
        return

    let prependElement = (ele, subEle) => {
        ele.innerHTML = subEle + ele.innerHTML
        return ele
    }

    let appendElement = (ele, subEle) => {
        ele.innerHTML = ele.innerHTML + subEle
        return ele
    }

    let generateStyle = (styles) => {
        return styles.join(';')
    }

    let generateCSS = (selector, styles) => {
        return `${selector}{${generateStyle(styles)}}`
    }

    appendElement(
        document.head,
        `<style>${generateCSS('[class*="player-marquee"]', [
            'display:none'
      ])}</style>`
    )

})()