1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-21 14:22:45 +00:00

qute: fix discord member bg, more miniflux header anchors

This commit is contained in:
Phantop 2024-09-02 12:30:31 -04:00
parent 6e652690c2
commit 5bef6058b7
2 changed files with 10 additions and 1 deletions

View file

@ -7,6 +7,7 @@
#app-mount { //discord
--background-primary: var(--bg_hover);
--bg-overlay-2: var(--background-primary);
--bg-overlay-chat: var(--background-primary);
--background-tertiary: var(--background-primary);
--background-secondary: var(--background-primary);
--background-secondary-alt: var(--background-primary);

View file

@ -13,7 +13,15 @@ for ($element of $elements) {
// Check if heading has any nested elements with id
var $innerElement = $element.querySelector('[id]');
if ($innerElement) { id = $innerElement.id; }
else { continue; }
else {
id = $element.tagName + '-' + $element.textContent
.replace(/\s+/g, '-') // Replace spaces with hyphens
.replace(/[^\w-]/g, '') // Remove non-word chars (except hyphens)
.replace(/--+/g, '-') // Replace multiple hyphens with single hyphen
.replace(/^-+/, '') // Trim hyphens from start
.replace(/-+$/, ''); // Trim hyphens from end
$element.id = id;
}
}
// Create anchor if not already present