Added toggle for :visited links.

This commit is contained in:
flash 2024-06-27 16:01:28 +00:00
parent cfeaae19a7
commit b0ad0108f8
2 changed files with 6 additions and 3 deletions

View file

@ -18,7 +18,7 @@
text-decoration: underline
}
.markup__link--visited,
.markup__link:visited {
.chat:not(.mami-do-not-mark-links-as-visited) .markup__link--visited,
.chat:not(.mami-do-not-mark-links-as-visited) .markup__link:visited {
color: #6B4F80;
}

View file

@ -152,6 +152,7 @@ const MamiInit = async args => {
settings.define('newLineOnEnter').default(false).create();
settings.define('showMarkupSelector').type(['always', 'focus', 'never']).default('focus').create();
settings.define('keepEmotePickerOpen').default(true).create();
settings.define('doNotMarkLinksAsVisited').default(false).create();
const noNotifSupport = !('Notification' in window);
settings.define('enableNotifications').default(false).immutable(noNotifSupport).critical().create();
@ -304,7 +305,8 @@ const MamiInit = async args => {
layout.getElement().classList.toggle('chat--compact', ev.detail.value);
layout.getInterface().getMessageList().getElement().classList.toggle('chat--compact', ev.detail.value);
});
settings.watch('preventOverflow', ev => args.parent.classList.toggle('prevent-overflow', ev.detail.value));
settings.watch('preventOverflow', ev => { args.parent.classList.toggle('prevent-overflow', ev.detail.value); });
settings.watch('doNotMarkLinksAsVisited', ev => { layout.getInterface().getMessageList().getElement().classList.toggle('mami-do-not-mark-links-as-visited', ev.detail.value); });
settings.watch('minecraft', ev => {
if(ev.detail.initial && ev.detail.value === 'no')
@ -450,6 +452,7 @@ const MamiInit = async args => {
category.setting('autoScroll').title('Enable auto scroll').done();
category.setting('closeTabConfirm').title('Confirm tab close').done();
category.setting('autoCloseUserContext').title('Auto-close user menus').done();
category.setting('doNotMarkLinksAsVisited').title("Don't mark links as visited").done();
});
sbSettings.category(category => {
category.header('Text');