mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 06:26:39 +00:00
feat(userscripts): add kagi-tweaks for minor CSS tweaks
This commit is contained in:
29
userscripts/kagi-tweaks.user.js
Normal file
29
userscripts/kagi-tweaks.user.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// ==UserScript==
|
||||
// @name Kagi Tweaks
|
||||
// @description Custom tweaks for kagi.com
|
||||
// @version 0.0.1
|
||||
// @namespace jimeh.me
|
||||
// @downloadURL https://github.com/jimeh/dotfiles/raw/main/userscripts/kagi-tweaks.user.js
|
||||
// @updateURL https://github.com/jimeh/dotfiles/raw/main/userscripts/kagi-tweaks.user.js
|
||||
// @inject-into content
|
||||
// @run-at document-end
|
||||
// @match *://kagi.com/*
|
||||
// @match *://*.kagi.com/*
|
||||
// ==/UserScript==
|
||||
(function () {
|
||||
const css = `
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--header-border: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
let styleElm = document.createElement('style');
|
||||
if (styleElm.styleSheet) {
|
||||
styleElm.styleSheet.cssText = css; // Support for IE
|
||||
} else {
|
||||
styleElm.appendChild(document.createTextNode(css));
|
||||
}
|
||||
document.getElementsByTagName("head")[0].appendChild(styleElm);
|
||||
})();
|
||||
Reference in New Issue
Block a user