mirror of
https://github.com/opus-tango/scriptinjector.git
synced 2026-03-20 03:55:25 +00:00
saving v0. will I ever need to update it?
This commit is contained in:
25
content.js
Normal file
25
content.js
Normal file
@@ -0,0 +1,25 @@
|
||||
function applyStyles() {
|
||||
const elementsToCutHeight = document.querySelectorAll(
|
||||
"div.text-gray-500 > a, div.text-gray-500 > button",
|
||||
);
|
||||
const elementsToCutMargin = document.querySelectorAll(
|
||||
"div.grid > div, div.grid > form",
|
||||
);
|
||||
|
||||
elementsToCutMargin.forEach((el) => {
|
||||
el.classList.remove("mb-4");
|
||||
el.classList.add("mb-1");
|
||||
});
|
||||
elementsToCutHeight.forEach((el) => {
|
||||
el.classList.remove("h-10");
|
||||
el.classList.add("h-6");
|
||||
});
|
||||
}
|
||||
|
||||
applyStyles();
|
||||
|
||||
const observer = new MutationObserver(applyStyles);
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
11
manifest.json
Normal file
11
manifest.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Minimal Injector",
|
||||
"version": "1.0",
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["https://karakeep.docker.localhost/dashboard/bookmarks"],
|
||||
"js": ["content.js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user