diff --git a/background.js b/background.js index 1dc22ac..a9dea42 100644 --- a/background.js +++ b/background.js @@ -46,25 +46,25 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { const entries = Object.entries(result.query.results); if (entries.length > 0) { if (entries.length > 5){ - console.warn(`Wiki server returned ${entries.length} results for the query '${conditions}'.\n` + console.warn(`[FL 1-Click Wiki] Wiki server returned ${entries.length} results for the query '${conditions}'.\n` + `Please notify the wiki admins about this.`); } for (let [key, entry] of entries) { - console.debug(`Opening tab for ${entry.fullurl}`); + console.debug(`[FL 1-Click Wiki] Opening tab for ${entry.fullurl}`); openNewTab(entry.fullurl, targetPosition); } } else { - console.debug(`No pages found for ID ${request.storyletId}, falling back to using title.`); + console.debug(`[FL 1-Click Wiki] No pages found for ID ${request.storyletId}, falling back to using title.`); openNewTab(destination, targetPosition); } }) .catch(error => { console.error(error); - console.debug("Error has occured, falling back to using title.") + console.debug("[FL 1-Click Wiki] Error has occured, falling back to using title.") openNewTab(destination, targetPosition); }); } else { - console.debug("No ID found for the storylet, falling back to using title."); + console.debug("[FL 1-Click Wiki] No ID found for the storylet, falling back to using title."); openNewTab(destination, targetPosition); } diff --git a/inject.js b/inject.js index 7f5e150..fb05079 100644 --- a/inject.js +++ b/inject.js @@ -44,9 +44,9 @@ if (currentStoryletId !== undefined) { if (currentStoryletId != null) { - console.debug(`Current storylet ID: ${currentStoryletId}`) + console.debug(`[FL 1-Click Wiki] Current storylet ID: ${currentStoryletId}`) } else{ - console.debug(`Current storylet ID is not known, falling back to title...`) + console.debug(`[FL 1-Click Wiki] Current storylet ID is not known, falling back to title...`) } window.postMessage({ @@ -87,7 +87,7 @@ let existingButtons = mediaRoot.getElementsByClassName(GLOBE_BTN_CLASS_LIST); if (existingButtons.length > 0) { - console.debug("Duplicate Wiki buttons found, please tell the developer about it!"); + console.debug("[FL 1-Click Wiki] Duplicate Wiki buttons found, please tell the developer about it!"); return; } @@ -108,7 +108,6 @@ container.insertBefore(rootFrequencyHolder, container.firstChild); } - //container.insertBefore(wikiButton, container.firstChild); rootFrequencyHolder.appendChild(wikiButton); } } @@ -137,7 +136,7 @@ let existingButtons = branchContainer.getElementsByClassName(GLOBE_BTN_CLASS_LIST); if (existingButtons.length > 0) { - console.debug("Duplicate Wiki buttons found, please tell the developer about it!"); + console.debug("[FL 1-Click Wiki] Duplicate Wiki buttons found, please tell the developer about it!"); return; }