Adjusting settings wiki table output

pull/311/head
Kevin Payravi 2023-11-03 17:51:42 -05:00
parent 28fea0b4d2
commit 1ee491c1e9
2 changed files with 14 additions and 11 deletions

View File

@ -227,6 +227,7 @@
.toggles a img { .toggles a img {
padding-right: .5rem; padding-right: .5rem;
vertical-align: middle;
} }
.toggles span { .toggles span {

View File

@ -385,23 +385,28 @@ async function loadOptions(lang) {
// Output wiki info: // Output wiki info:
let wikiInfo = document.createElement('span'); let wikiInfo = document.createElement('span');
let wikiLink = document.createElement("a"); let iconLink = document.createElement("a");
wikiLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path; iconLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
wikiLink.title = 'Visit ' + sites[i].destination; iconLink.title = 'Visit ' + sites[i].destination;
wikiLink.target = '_blank'; iconLink.target = '_blank';
let icon = document.createElement("img"); let icon = document.createElement("img");
icon.src = 'favicons/' + sites[i].language.toLowerCase() + '/' + sites[i].destination_icon; icon.src = 'favicons/' + sites[i].language.toLowerCase() + '/' + sites[i].destination_icon;
icon.alt = 'Visit ' + sites[i].destination; icon.alt = 'Visit ' + sites[i].destination;
wikiLink.appendChild(icon); iconLink.appendChild(icon);
wikiLink.appendChild(document.createTextNode(sites[i].destination)); wikiInfo.appendChild(iconLink);
wikiInfo.appendChild(wikiLink);
wikiInfo.appendChild(document.createTextNode(' (from ' + sites[i].origins_label + ')'));
if (lang === 'ALL') { if (lang === 'ALL') {
const languageSpan = document.createElement('span'); const languageSpan = document.createElement('span');
languageSpan.classList.add('text-sm'); languageSpan.classList.add('text-sm');
languageSpan.innerText = ' [' + sites[i].language + '] '; languageSpan.innerText = ' [' + sites[i].language + '] ';
wikiInfo.appendChild(languageSpan); wikiInfo.appendChild(languageSpan);
} }
let wikiLink = document.createElement("a");
wikiLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
wikiLink.title = 'Visit ' + sites[i].destination;
wikiLink.target = '_blank';
wikiLink.appendChild(document.createTextNode(sites[i].destination));
wikiInfo.appendChild(wikiLink);
wikiInfo.appendChild(document.createTextNode(' (from ' + sites[i].origins_label + ')'));
let siteContainer = document.createElement("div"); let siteContainer = document.createElement("div");
// Output inputs container: // Output inputs container:
@ -672,9 +677,6 @@ document.addEventListener('DOMContentLoaded', function () {
chrome.storage.sync.get({ 'notifications': 'on' }, function (item) { chrome.storage.sync.get({ 'notifications': 'on' }, function (item) {
setNotifications(item.notifications, false); setNotifications(item.notifications, false);
}); });
// chrome.storage.sync.get({ 'searchSetting': 'replace' }, function (item) {
// setSearchSetting(item.searchSetting, false);
// });
chrome.storage.sync.get({ 'breezewiki': 'off' }, function (item) { chrome.storage.sync.get({ 'breezewiki': 'off' }, function (item) {
setBreezeWiki(item.breezewiki, false); setBreezeWiki(item.breezewiki, false);
}); });