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