1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-22 21:26:47 +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 #app-mount { //discord
--background-primary: var(--bg_hover); --background-primary: var(--bg_hover);
--bg-overlay-2: var(--background-primary); --bg-overlay-2: var(--background-primary);
--bg-overlay-chat: var(--background-primary);
--background-tertiary: var(--background-primary); --background-tertiary: var(--background-primary);
--background-secondary: var(--background-primary); --background-secondary: var(--background-primary);
--background-secondary-alt: 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 // Check if heading has any nested elements with id
var $innerElement = $element.querySelector('[id]'); var $innerElement = $element.querySelector('[id]');
if ($innerElement) { id = $innerElement.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 // Create anchor if not already present