您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
一键打包下载国科大sep上的课件,不用一个个点了
// ==UserScript== // @name 一键打包下载国科大sep上的课件 // @version 1.0 // @description 一键打包下载国科大sep上的课件,不用一个个点了 // @author VnYzm // @require https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @require https://cdn.bootcss.com/jszip/3.2.2/jszip.min.js // @require https://cdn.bootcss.com/FileSaver.js/1.3.8/FileSaver.min.js // @match https://course.ucas.ac.cn/portal/site/*/tool/* // @namespace DownloadPPT // @license GPLv2 // ==/UserScript== (function() { 'use strict'; $('button:contains("复制")').after( '<input type="button" value="下载" style="margin:0" class="btn btn-default">'); $(':button').click(function () { let zip = new JSZip(); let files = $('input[name="selectedMembers"]:checked'); if (files.length == 0) return; $(':button').prop('disabled','disabled') files.each(function () { let a = $(this).parent().next().children().first(); zip.file( a.next().find('.hidden-sm').text(), fetch(a.prop('href')).then(r => r.blob())); }); zip.generateAsync({type:'blob'}).then(function(content) { saveAs(content, '课件.zip'); $(':button').removeProp('disabled'); }); }); })();