Skip to content

Instantly share code, notes, and snippets.

@ackerleytng
Created February 25, 2024 13:29
Show Gist options
  • Save ackerleytng/2d11a0c59f8ae26d5c7a35457aa24af3 to your computer and use it in GitHub Desktop.
Save ackerleytng/2d11a0c59f8ae26d5c7a35457aa24af3 to your computer and use it in GitHub Desktop.
Tampermonkey script to improve kernel patch reading experience
// ==UserScript==
// @name Improved-LKML
// @version 2024-02-23
// @description Improve kernel patch reading experience
// @author ackerleytng
// @match https://lore.kernel.org/*
// @grant GM_addStyle
// @grant GM_getResourceText
// @resource IMPORTED_CSS https://lore.kernel.org/linux-mm/userContent.css
// ==/UserScript==
(function() {
'use strict';
const importedCss = GM_getResourceText("IMPORTED_CSS");
const cleanedCssForChrome = importedCss.split("\n").filter(line => !line.match("moz-only")).join("\n");
GM_addStyle(cleanedCssForChrome);
GM_addStyle("hr { margin-top: 50px; }");
const anchors = document.querySelectorAll("a");
[...anchors].filter(e => e.innerText == "*").map(e => {
// Use !important to override font size in cleanedCssForChrome
e.nextSibling.nextSibling.style.cssText = "font-size: 15pt !important";
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment