Created
October 7, 2024 12:59
-
-
Save Rhilip/6c3da1c2b8a20fa3baae9e4b00716875 to your computer and use it in GitHub Desktop.
厚大-考试排版优化(仅错题)
This file contains hidden or 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 厚大-考试排版优化(仅错题) | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-04-16 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.youkaoshi.cn/doexam.html?* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if ((new URLSearchParams(location.href)).get('layout') === null) { | |
location.href = location.href + '&layout=short' | |
} | |
$( document ).ready(function () { | |
$('.question-analysis.wrong').each(function () { | |
const that = $(this); | |
const that_text = that.html().replace('<br>', '[[br]]'); | |
const clean_text = $('<div>').html(that_text).text().replace('[[br]]','<br>'); | |
that.html(clean_text); | |
}); | |
$('span[style="font-size: medium"]').attr('style',''); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment