xuetangx-remove-qrcode

移除学堂在线课程的强制微信扫码关注

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         xuetangx-remove-qrcode
// @namespace    https://github.com/DuckSoft
// @version      0.2.1
// @description  移除学堂在线课程的强制微信扫码关注
// @author       DuckSoft
// @match        *://www.xuetangx.com/courses/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // 移除遮罩层方法
    let remove_fun = () => {
        let mask;
        if (mask = document.querySelector(".course_mask")) {
            mask.remove()
        }
    };
    // 绑定窗口加载完毕事件
    (f => {
        if (document.addEventListener) window.addEventListener("load", f, false);
        else if (window.attachEvent) window.attachEvent("onload", f);
    })(remove_fun);
    // 双击页面立即移除(适用于网络加载缓慢时)
    (f => window.addEventListener("dblclick", f, false))(remove_fun);
})();