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:
parent
6e652690c2
commit
5bef6058b7
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue