Created
March 17, 2025 01:13
-
-
Save hochun836/19d62dd473049ba2e892f5e671942a4d 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 Style Microsoft documents | |
// @namespace https://hochun836.com/ | |
// @version 0.1 | |
// @description enhance experience of reading Microsoft documents | |
// @author Ho.Chun | |
// @match https://learn.microsoft.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// 變更 .content 下的 h2 元素 | |
document.querySelectorAll('.content h2').forEach(x => { | |
x.innerText = `${x.innerText}`; | |
x.style.backgroundColor = '#ffeaf2'; | |
}); | |
// 變更 .content 下的 h3 元素 | |
document.querySelectorAll('.content h3').forEach(x => { | |
x.innerText = `● ${x.innerText}`; | |
}); | |
// 變更 .content 下的 h4 元素 | |
document.querySelectorAll('.content h4').forEach(x => { | |
x.innerText = `o ${x.innerText}`; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment