diff --git a/src/web/HTMLOperation.mjs b/src/web/HTMLOperation.mjs index 5d12470..5373113 100755 --- a/src/web/HTMLOperation.mjs +++ b/src/web/HTMLOperation.mjs @@ -131,14 +131,16 @@ class HTMLOperation { */ function titleFromWikiLink(url) { const splitURL = url.split("/"); - if (splitURL.indexOf("wiki") < 0) { + if (splitURL.indexOf("wikipedia.org") < 0 && splitURL.indexOf("forensicswiki.org") < 0) { // Not a wiki link, return full URL return `More Informationopen_in_new`; } + const wikiName = splitURL.indexOf("forensicswiki.org") < 0 ? "Wikipedia" : "Forensics Wiki"; + const pageTitle = decodeURIComponent(splitURL[splitURL.length - 1]) .replace(/_/g, " "); - return `${pageTitle}open_in_new on Wikipedia`; + return `${pageTitle}open_in_new on ${wikiName}`; } export default HTMLOperation;