Last active
February 10, 2022 02:53
-
-
Save tan9/df262289574f8c1db32e5705b8cddabc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 臺中市校園閱讀認證小幫手 | |
// @description 在「臺中市國民小學推動校園閱讀線上認證系統」將認證題目改用注音字型顯示、增加快捷鍵等,方便認證。 | |
// @version 0.2.1 | |
// @author Pei-Tang Huang | |
// @downloadURL https://gist.githubusercontent.com/tan9/df262289574f8c1db32e5705b8cddabc/raw/ | |
// @updateURL https://gist.githubusercontent.com/tan9/df262289574f8c1db32e5705b8cddabc/raw/ | |
// @match *://read.tc.edu.tw/* | |
// @require https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.3/mousetrap.min.js | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// ==/UserScript== | |
(function() { | |
"use strict"; | |
const $ = jQuery; | |
// 改用注音字體 | |
$("span") | |
.filter((i, e) => $(e).css("font-family") === "標楷體") | |
.css( | |
"font-family", | |
"華康標楷W5注音,文鼎標楷注音,王漢宗中楷體注音,標楷體" | |
); | |
// 為選項加上快捷鍵 | |
$('input[type="radio"][name="my_answer"]') | |
.before(i => `<kbd>${i + 1}</kbd>`) | |
.each((i, e) => | |
Mousetrap.bind(e.value, () => { | |
e.checked = true; | |
$('input[type="submit"]').click(); | |
}) | |
); | |
// 自動跳過跳到下一題 | |
if ($('input[value="下一題"')) { | |
setTimeout(() => $('input[value="下一題"').click(), 1500); | |
} | |
})(); |
您好~
在上頭「安裝及使用方法」
4.安裝本腳本檔: https://gist.github.com/tan9/df262289574f8c1db32e5705b8cddabc/raw/1bcb483513c5b619ec7e45925222d20bffcf208e/read.tc.user.js
所連結到的腳本檔寫著會「降級」
且內容中:
--- 當前版本
+++ 新版本
-// @match *://read.tc.edu.tw/*
+// @match *://read.tc.edu.tw/reading_certificate/*
看起來像是又改為原來的網址,我試著點選後,果然真的降級了……回到先前的網址,修正腳本檔中的@match才恢復正常顯示……所以才有這疑問。
@ljc0224 阿吉老師好,看起來是第 4 步的連結指到了某個特定的版本,已經改指到最新的版本囉。
謝謝您!:)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ljc0224 阿吉老師好,
修改的歷程在這裡:
https://gist.github.com/tan9/df262289574f8c1db32e5705b8cddabc/revisions
最近都沒有異動,現在其他家長使用上會有什麼問題嗎?