Skip to content

Instantly share code, notes, and snippets.

@Rhilip
Created October 7, 2024 12:59
Show Gist options
  • Save Rhilip/6c3da1c2b8a20fa3baae9e4b00716875 to your computer and use it in GitHub Desktop.
Save Rhilip/6c3da1c2b8a20fa3baae9e4b00716875 to your computer and use it in GitHub Desktop.
厚大-考试排版优化(仅错题)
// ==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