您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Help you download notice file from hhu oa system not need plugins.
// ==UserScript== // @name HHU Notice File Download Helper // @namespace http://tampermonkey.net/ // @version 0.1.1 // @description Help you download notice file from hhu oa system not need plugins. // @author JiaFeiMiao-k-Cat // @match http://202.119.113.213/seeyon/bulData.do?* // @match http://newoa.hhu.edu.cn/seeyon/bulData.do?* // @icon https://www.google.com/s2/favicons?sz=64&domain=www.hhu.edu.cn // @grant none // @license MIT // ==/UserScript== function getFileName(){ var s = document.querySelector("#viewOriginalContentA").getAttribute('onclick'); var re = /popupContentWin\('.*','(.+?)','.*','.*','.*','(.+?)'\)/; var arr = re.exec(s); return arr[2] + '.' + arr[1].toLowerCase(); } function getDownloadLink(){ var s = document.querySelector("#mainbodyDiv > iframe").getAttribute('src'); var re = /\/seeyon\/officeTrans\.do\?fileCreateDate=(.+?)\&fileCreateDate1=(.+?)\&fileId=(.+?)\&v=(.+?)\&needDownload=false\&filename=(.+?)$/; var arr = re.exec(s); return `/seeyon/fileDownload.do?method=doDownload&filename=` + getFileName() + `&v=` + arr[4] + `&viewMode=download&fileId=` + arr[3] + `&createDate=` + arr[2]; } (function() { 'use strict'; var new_span = document.createElement("span"); $("#noprint > span").append( `<span class="head_title_collect hand"> <span class="syIcon sy-call_template set_color_gold"></span> <span><a href="` + getDownloadLink() + `">点击下载</a></span> </span>`); })();