如何安裝
You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.
You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.
You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.
You will need to install an extension such as Tampermonkey or Userscripts to install this script.
You will need to install a user script manager extension to install this script.
OK
如何安裝
You will need to install an extension such as Stylus to install this script.
You will need to install an extension such as Stylus to install this script.
You will need to install an extension such as Stylus to install this script.
You will need to install a user style manager extension to install this script.
You will need to install a user style manager extension to install this script.
OK
// ==UserScript==
// @name Tronclass Downloader
// @namespace TKU.iClass
// @version 2.3.4.1-universal
// @license MIT
// @description Download Tronclass Courseware
// @author Hs0 (Forked from NCJ)
// @match *://*.edu.tw/course/*/courseware
// @grant none
// @require https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js
// ==/UserScript==
$(document).bind('DOMSubtreeModified', function() {
if ($('#Tronclass_Downloader').length == 0 && $('#file-previewer-with-note > div > div > div.header.clearfix').length) {
$('#file-previewer-with-note > div > div > div.header.clearfix').append('');
$("#Tronclass_Downloader").css("position", "relative").css("left", 10);
$('#Tronclass_Downloader').click(function(){
window.open(decodeURIComponent(document.getElementById('pdf-viewer').src.split("?file=")[1]));
});
}
if ($('#Tronclass_Downloader_video').length == 0 && $('video').length && $('video')[0].children.length == 3 && $('video')[0].children[0].getAttribute('src').indexOf('/api') == 0) {
var v=$('video')[0];
for (var i of v.children) {
$(v.parentNode.parentNode).prepend(`\t${i.getAttribute('label')}\t`);
}
}
});