mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-01-21 13:28:41 +01:00
improve background image url string
This commit is contained in:
parent
74c02bb4fb
commit
43499ede04
@ -309,7 +309,7 @@ const BookmarkTile = function({
|
||||
|
||||
this.element.bookmark.style.setProperty('--bookmark-display-visual-size', bookmarkData.link.display.visual.size);
|
||||
|
||||
this.element.bookmark.style.setProperty('--bookmark-display-visual-image-url', 'url(' + trimString(bookmarkData.link.display.visual.image.url) + ')');
|
||||
this.element.bookmark.style.setProperty('--bookmark-display-visual-image-url', 'url("' + trimString(bookmarkData.link.display.visual.image.url) + '")');
|
||||
|
||||
this.element.bookmark.style.setProperty('--bookmark-display-name-size', bookmarkData.link.display.name.size);
|
||||
|
||||
@ -413,7 +413,7 @@ const BookmarkTile = function({
|
||||
switch (bookmarkData.link.background.type) {
|
||||
case 'image':
|
||||
if (isValidString(bookmarkData.link.background.image.url)) {
|
||||
this.element.bookmark.style.setProperty('--bookmark-background-image-url', 'url(' + trimString(bookmarkData.link.background.image.url) + ')');
|
||||
this.element.bookmark.style.setProperty('--bookmark-background-image-url', 'url("' + trimString(bookmarkData.link.background.image.url) + '")');
|
||||
};
|
||||
break;
|
||||
};
|
||||
|
@ -398,7 +398,7 @@ theme.background.image = {
|
||||
|
||||
const allUrls = trimString(state.get.current().theme.background.image.url).split(/\s+/).filter((item) => { return item != ''; });
|
||||
|
||||
html.style.setProperty('--theme-background-image', 'url(' + allUrls[Math.floor(Math.random() * allUrls.length)] + ')');
|
||||
html.style.setProperty('--theme-background-image', 'url("' + allUrls[Math.floor(Math.random() * allUrls.length)] + '")');
|
||||
|
||||
} else {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user