Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tampermonkey+腾讯课堂+超过有效期的活动课程 #20

Open
san3Xian opened this issue Mar 26, 2020 · 1 comment
Open

Tampermonkey+腾讯课堂+超过有效期的活动课程 #20

san3Xian opened this issue Mar 26, 2020 · 1 comment

Comments

@san3Xian
Copy link
Owner

san3Xian commented Mar 26, 2020

// ==UserScript==
// @name         腾讯课堂-过时课程入口显现
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  腾讯课堂-过期课程播放按钮
// @author       WILO
// @supportURL   https://github.com/easyjack/randomMark/issues/20
// @match        https://ke.qq.com/course/*
// @icon         https://ke.qq.com/favicon.ico
// @grant        none
// @run-at       document-end
// ==/UserScript==

//var term_id = document.getElementsByClassName("class-content js-term-item js-term-baseinfo class-content--no-des active")[0].getAttribute("data-termid");
var cource_id = metaData.terms[0].cid;
var term_id = metaData.terms[0].term_id;

if(document.getElementById("js-imgtext")){
    var button_bar= document.getElementById("js-imgtext").getElementsByClassName("text-right text-right--pay")[0].getElementsByClassName("oper-bar")[0];
    console.log(button_bar);
    var button_player=document.createElement("span");
    button_player.setAttribute("class","btn-join btn-default");
    //button_player.setAttribute("onclick","window.location.href='/webcourse/index.html#cid=" + cource_id + "&term_id=" + term_id + "'");
    button_player.setAttribute("onclick","window.open('https://ke.qq.com/webcourse/index.html#cid=" + cource_id + "&term_id=" + term_id + "')");

    button_player.textContent="进入播放页";

    button_bar.appendChild(button_player);
}
@san3Xian
Copy link
Owner Author

screenshot:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant