Add URL to destination wiki name text (#227)

pull/260/head
Elaeagnifolia 2023-09-14 23:35:20 -05:00 committed by GitHub
parent 99738b1bec
commit c3cddbd819
1 changed files with 8 additions and 2 deletions

View File

@ -318,8 +318,14 @@ async function loadOptions(lang) {
icon.src = 'favicons/' + lang.toLowerCase() + '/' + sites[i].destination_icon;
icon.alt = 'Visit ' + sites[i].destination;
iconLink.appendChild(icon);
let destinationLink = document.createElement("a");
destinationLink.title = sites[i].destination;
destinationLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
destinationLink.target = '_blank';
destinationLink.append(document.createTextNode(sites[i].destination));
wikiInfo.appendChild(iconLink);
wikiInfo.appendChild(document.createTextNode(sites[i].origins_label + ' » ' + sites[i].destination));
wikiInfo.appendChild(document.createTextNode(sites[i].origins_label + ' » '));
wikiInfo.appendChild(destinationLink);
let siteContainer = document.createElement("div");
// Output inputs container:
@ -635,4 +641,4 @@ document.addEventListener('DOMContentLoaded', function () {
var key = Object.keys(item)[0];
document.getElementById('countBreezeWiki').textContent = item[key];
});
});
});