Allow i18n for the extension (#716)

pull/740/head
Dianliang233 2024-06-29 18:20:53 +08:00 committed by GitHub
parent a27ab02b6e
commit 4d9243aab7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 1210 additions and 379 deletions

857
_locales/en/messages.json Normal file
View File

@ -0,0 +1,857 @@
{
"extensionName": {
"message": "Indie Wiki Buddy",
"description": "The name of the extension"
},
"extensionDescription": {
"message": "Indie Wiki Buddy helps you discover quality, independent wikis through alerts, redirects, and search filtering.",
"description": "The description of the extension"
},
"bannerText": {
"message": "There is $descriptor$ wiki covering this topic$language$!",
"description": "Text to display in the banner for the indie wiki link",
"placeholders": {
"descriptor": {
"content": "$1",
"example": "an independent"
},
"language": {
"content": "$2",
"example": " in English"
}
}
},
"bannerDescriptorIndependent": {
"message": "an independent",
"description": "Descriptor used for an independent wiki. See the bannerText message for more information."
},
"bannerDescriptorWikigg": {
"message": "a wiki.gg",
"description": "Descriptor used for a wiki.gg wiki"
},
"bannerDescriptorIndependentOfficial": {
"message": "an official independent",
"description": "Descriptor used for an official independent wiki. See the bannerText message for more information."
},
"bannerDescriptorWikiggOfficial": {
"message": "an official wiki.gg",
"description": "Descriptor used for an official wiki.gg wiki. See the bannerText message for more information."
},
"bannerLanguageEnglish": {
"message": " in English",
"description": "For an wiki in English. See the bannerText message for more information. Include a leading space when appropriate."
},
"bannerVisit": {
"message": "Visit $destination$ →",
"description": "Text to display in the banner for the visit link",
"placeholders": {
"destination": {
"content": "$1",
"example": "wiki name"
}
}
},
"bannerBreezeWiki": {
"message": "View this Fandom wiki through BreezeWiki",
"description": "Text to display in the banner for the BreezeWiki link"
},
"bannerRestore": {
"message": "⎌ Restore banner",
"description": "Text to display in the banner for the restore banner link"
},
"bannerRestoreDone": {
"message": "✓ Banner restored",
"description": "Text to display in the banner after the banner has been restored"
},
"bannerDisable": {
"message": "✕ Disable banner for this wiki",
"description": "Text to display in the banner for the disable banner link"
},
"bannerDisableDone": {
"message": "✓ Banner disabled",
"description": "Text to display in the banner after the banner has been disabled"
},
"bannerRedirect": {
"message": "↪ Auto redirect this wiki",
"description": "Text to display in the banner for the redirect link"
},
"bannerRedirectDone": {
"message": "✓ Redirect enabled",
"description": "Text to display in the banner after the redirect has been enabled"
},
"searchResultLookup": {
"message": "Look up $article$ on $destination$",
"description": "Displayed for a search result to a non-indie wiki article when an indie wiki is available.",
"placeholders": {
"article": {
"content": "$1",
"example": "search term"
},
"destination": {
"content": "$2",
"example": "wiki name"
}
}
},
"searchResultLookupEnglish": {
"message": "Look up $article$ on $destination$ (EN)",
"description": "Displayed for a search result to a non-indie wiki article when an indie wiki in English is available.",
"placeholders": {
"article": {
"content": "$1",
"example": "search term"
},
"destination": {
"content": "$2",
"example": "wiki name"
}
}
},
"searchResultVisit": {
"message": "Visit $destination$ instead",
"description": "Displayed for a search result to a non-indie wiki when an indie wiki is available.",
"placeholders": {
"destination": {
"content": "$1",
"example": "wiki name"
}
}
},
"searchResultVisitEnglish": {
"message": "Visit $destination$ (EN) instead",
"description": "Displayed for a search result to a non-indie wiki when an indie wiki in English is available.",
"placeholders": {
"destination": {
"content": "$1",
"example": "wiki name"
}
}
},
"searchResultReenable": {
"message": "Re-enable the result below",
"description": "Prompt to re-enable a non-indie search result"
},
"searchRemovalNotice": {
"message": "Indie Wiki Buddy has filtered out results from $destination$. Look for results from $link$ instead.",
"description": "Notice that some search results have been removed and a prompt to view them from an indie wiki",
"placeholders": {
"destination": {
"content": "$1",
"example": "wiki name"
},
"link": {
"content": "$2",
"example": "a link to the indie wiki"
}
}
},
"searchFilteredResultsShow": {
"message": "Show filtered results",
"description": "Button to show filtered search results"
},
"searchFilteredResultsHide": {
"message": "Re-hide filtered results",
"description": "Button to hide filtered search results"
},
"settingsTitle": {
"message": "Indie Wiki Buddy settings",
"description": "Title of the settings page"
},
"settingsGuide": {
"message": "Guide",
"description": "Link to the guide"
},
"settingsWebsite": {
"message": "Website",
"description": "Link to the website"
},
"settingsChangelog": {
"message": "Changelog",
"description": "Link to the changelog"
},
"settingsSubmitWiki": {
"message": "Submit a Wiki",
"description": "Link to the wiki submission form"
},
"settingsSourceCode": {
"message": "Source code",
"description": "Link to the source code"
},
"settingsBannerHide": {
"message": "Hide this message",
"description": "Button to hide the banner"
},
"settingsBannerOpera": {
"message": "Opera users: By default, Opera will block extensions from running on search engines. Search engine access can be enabled per-extension by going to \"about:extensions\" and selecting the \"Allow access to search page results\" option under Indie Wiki Buddy.",
"description": "Notice for Opera users about enabling search engine access"
},
"settingsBannerReview": {
"message": "Enjoying Indie Wiki Buddy? Please leave a review!",
"description": "Notice to leave a review for the extension"
},
"settingsBannerReviewContact": {
"message": "Having issues or ideas for improvement? Please $linkStart$contact me$linkEnd$!",
"description": "Notice to contact the developer for issues or ideas",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"firstInstallInfo1": {
"message": "Thanks for installing Indie Wiki Buddy! Let's get you set up."
},
"firstInstallInfo2": {
"message": "Use the links above to see the full guide, submit new wikis, or contact the developer."
},
"firstInstallInfo3": {
"message": "In the settings below, you can toggle features on and off. This includes the option to enable $BreezeWiki$, an alternative frontend that renders Fandom wikis without ads or bloat.",
"placeholders": {
"BreezeWiki": {
"content": "$1",
"example": "BreezeWiki"
}
}
},
"firstInstallInfo4": {
"message": "Below that, you can individually configure what happens when you visit Fandom, Fextralife, and Neoseeker wikis that have an independent alternative, as well as what happens to their results in search engines. For visiting wikis, you can choose to be $alert$ alerted (default) or $redirect$ automatically redirected. On search engines, you can choose to $replace$ replace (default) or $hide$ hide search results.",
"placeholders": {
"alert": {
"content": "$1",
"example": "(image for alert)"
},
"redirect": {
"content": "$2",
"example": "(image for redirect)"
},
"replace": {
"content": "$3",
"example": "(image for replace)"
},
"hide": {
"content": "$4",
"example": "(image for hide)"
}
}
},
"firstInstallInfo5": {
"message": "You can access these settings in the future via the extension's icon $logo$ at the top right of your browser. If you don't see the icon, it may be in the extension dropdown, which can be opened via the jigsaw icon $jigsaw$ (also at the top right of your browser).",
"placeholders": {
"logo": {
"content": "$1",
"example": "(image for the extension icon)"
},
"jigsaw": {
"content": "$2",
"example": "(image for the jigsaw icon)"
}
}
},
"settingsGeneral": {
"message": "General settings",
"description": "General settings section"
},
"settingsNotifications": {
"message": "Desktop notifications for redirections",
"description": "Option to enable desktop notifications for redirections"
},
"settingsCrossLanguage": {
"message": "Redirect non-English Fandom wikis to indie English wikis when no same-language wiki exists",
"description": "Option to redirect non-English Fandom wikis to indie English wikis when no same-language wiki exists"
},
"settingsOpenChangelog": {
"message": "Open changelog when Indie Wiki Buddy is updated",
"description": "Option to open the changelog when Indie Wiki Buddy is updated"
},
"settingsSearchEngineFiltering": {
"message": "Search engine filtering",
"description": "Search engine filtering section"
},
"settingsHiddenResultsBanner": {
"message": "On search engines, show banner when non-indie results are hidden",
"description": "Option to show a banner when non-indie results are hidden"
},
"settingsReorderResults": {
"message": "On Google, move indie wikis above non-indie results and hide duplicates",
"description": "Option to move indie wikis above non-indie results and hide duplicates on Google"
},
"settingsBreezeWiki": {
"message": "BreezeWiki alternative frontend for Fandom ($linkStart$learn more$linkEnd$)",
"description": "Option to enable BreezeWiki",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"settingsBreezeWikiDisabled": {
"message": "BreezeWiki off",
"description": "Option to disable BreezeWiki"
},
"settingsBreezeWikiBanner": {
"message": "Insert banner link to take you to BreezeWiki",
"description": "Option to show the BreezeWiki banner on Fandom wikis"
},
"settingsBreezeWikiRedirect": {
"message": "Automatically redirect Fandom to BreezeWiki",
"description": "Option to redirect Fandom wikis to BreezeWiki"
},
"settingsBreezeWikiHost": {
"message": "BreezeWiki host:",
"description": "Select for a BreezeWiki host"
},
"settingsBreezeWikiCustomHost": {
"message": "Custom BreezeWiki domain:",
"description": "Input for a custom BreezeWiki host not included by default"
},
"settingsBreezeWikiCustomHostOption": {
"message": "Custom host...",
"description": "Option to input a custom BreezeWiki host"
},
"settingsBreezeWikiCustomHostSet": {
"message": "Set domain",
"description": "Button to confirm input for a custom BreezeWiki host"
},
"settingsBreezeWikiCustomHostSetSuccessful": {
"message": "Successfully added",
"description": "Prompt that the custom BreezeWiki host has been successfully added"
},
"settingsBreezeWikiCustomHostSetFailed": {
"message": "Failed to add",
"description": "Prompt that the custom BreezeWiki host has failed to be added"
},
"settingsWiki": {
"message": "Individual wiki settings",
"description": "Individual wiki settings section"
},
"settingsWikiLegend": {
"message": "Icon legend",
"description": "Legend for the icons in the individual wiki settings"
},
"settingsWikiLegendWikiExp": {
"message": "When visiting Fandom, Fextralife, or Neoseeker wikis with an independent alternative, IWB can:",
"description": "Explanation for the icons in wiki experience"
},
"settingsWikiLegendSearchExp": {
"message": "When search engine results include Fandom, Fextralife, or Neoseeker wikis with an independent alternative, IWB can:",
"description": "Explanation for the icons in search experience"
},
"settingsDisabled": {
"message": "Do nothing",
"description": "Option to disable any action"
},
"settingsAlert": {
"message": "Display banner linking to indie wiki",
"description": "Option to alert the user with banner when visiting non-indie wikis"
},
"settingsRedirect": {
"message": "Redirect to indie wiki",
"description": "Option to redirect to indie wikis when visiting non-indie wikis"
},
"settingsReplace": {
"message": "Replace result with link to indie wiki",
"description": "Option to replace search results with links to non-indie wikis"
},
"settingsHide": {
"message": "Hide the result",
"description": "Option to hide search results"
},
"settingsFilterByLanguage": {
"message": "Filter wikis by language:",
"description": "Select for a language filter"
},
"settingsFilterByName": {
"message": "Filter wikis by name:",
"description": "Input for a name filter"
},
"settingsLangAll": {
"message": "All languages",
"description": "Option to show all languages"
},
"settingsLangDE": {
"message": "[DE] German / Deutsch",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, DE should be \"[DE] German / Deutsch\" in English, but just \"[DE] Deutsch\" in German."
},
"settingsLangEN": {
"message": "[EN] English",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, EN should be \"[EN] Englisch / English\" in German, but just \"[EN] English\" in English."
},
"settingsLangES": {
"message": "[ES] Spanish / Español",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, ES should be \"[ES] Spanish / Español\" in English, but just \"[ES] Español\" in Spanish."
},
"settingsLangFI": {
"message": "[FI] Finnish / suomi",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, FI should be \"[FI] Finnish / suomi\" in English, but just \"[FI] suomi\" in Finnish."
},
"settingsLangFR": {
"message": "[FR] French / Français",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, FR should be \"[FR] French / Français\" in German, but just \"[FR] Français\" in French."
},
"settingsLangHU": {
"message": "[HU] Hungarian / Magyar",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, HU should be \"[HU] Hungarian / Magyar\" in English, but just \"[HU] Magyar\" in Hungarian."
},
"settingsLangIT": {
"message": "[IT] Italian / Italiano",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, IT should be \"[IT] Italian / Italiano\" in English, but just \"[IT] Italiano\" in Italian."
},
"settingsLangJA": {
"message": "[JA] Japanese / 日本語",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, JA should be \"[JA] Japanese / 日本語\" in English, but just \"[JA] 日本語\" in Japanese."
},
"settingsLangKO": {
"message": "[KO] Korean / 한국어",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, KO should be \"[KO] Korean / 한국어\" in English, but just \"[KO] 한국어\" in Korean."
},
"settingsLangLZH": {
"message": "[LZH] Classical Chinese / 文言",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, LZH should be \"[LZH] Classical Chinese / 文言\" in English, but just \"[LZH] 文言\" in Classical Chinese."
},
"settingsLangPL": {
"message": "[PL] Polish / Polski",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, PL should be \"[PL] Polish / Polski\" in English, but just \"[PL] Polski\" in Polish."
},
"settingsLangPT": {
"message": "[PT] Portuguese / Português",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, PT should be \"[PT] Portuguese / Português\" in English, but just \"[PT] Português\" in Portuguese."
},
"settingsLangRU": {
"message": "[RU] Russian / Русский",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, RU should be \"[RU] Russian / Русский\" in English, but just \"[RU] Русский\" in Russian."
},
"settingsLangTH": {
"message": "[TH] Thai / ไทย",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, TH should be \"[TH] Thai / ไทย\" in English, but just \"[TH] ไทย\" in Thai."
},
"settingsLangTOK": {
"message": "[TOK] Toki Pona / toki pona",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, TOKE should be \"[TOK] Toki Pona / toki pona\" in English, but just \"[TOK] toki pona\" in Toki Pona."
},
"settingsLangUK": {
"message": "[UK] Ukrainian / Українська",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, UK should be \"[UK] Ukrainian / Українська\" in English, but just \"[UK] Українська\" in Ukrainian."
},
"settingsLangZH": {
"message": "[ZH] Chinese / 中文",
"description": "Do not translate the language code in brackets. If this language is your language, leave only one name. Otherwise, add the name of the language in your language before the slash. For example, ZH should be \"[ZH] Chinese / 中文\" in English, but just \"[ZH] 中文\" in Chinese."
},
"settingsNameFilterPlaceholder": {
"message": "Enter wiki name...",
"description": "Placeholder for the name filter input"
},
"settingsWikiExp": {
"message": "Wiki experience",
"description": "Wiki experience section"
},
"settingsSearchExp": {
"message": "Search experience",
"description": "Search experience section"
},
"settingsSetColumn": {
"message": "Click icon to set all wikis in column:",
"description": "Instruction to set all wikis in a column"
},
"settingsNewWiki": {
"message": "Default for new wikis in future updates:",
"description": "Instruction to set default for new wikis in future updates"
},
"settingsFunStats": {
"message": "Fun Stats",
"description": "Fun stats section"
},
"settingsFunStatsAlerts": {
"message": "Alerted to indie wikis $alert$ times",
"description": "Number of times alerted to indie wikis",
"placeholders": {
"alert": {
"content": "$1",
"example": "123"
}
}
},
"settingsFunStatsRedirects": {
"message": "Automatically redirected to indie wikis $redirect$ times",
"description": "Number of times redirected to indie wikis",
"placeholders": {
"redirect": {
"content": "$1",
"example": "123"
}
}
},
"settingsFunStatsBreezeWiki": {
"message": "Automatically redirected to BreezeWiki $breezeWiki$ times",
"description": "Number of times visited Fandom wikis through BreezeWiki",
"placeholders": {
"breezeWiki": {
"content": "$1",
"example": "123"
}
}
},
"settingsFunStatsSearchFilters": {
"message": "$hide$ search engine results filtered",
"description": "Number of non-indie search results hidden",
"placeholders": {
"hide": {
"content": "$1",
"example": "123"
}
}
},
"settingsDisableFor": {
"message": "Do nothing for $origin$",
"description": "Tooltip for option to disable any action for a specific wiki",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
}
}
},
"settingsAlertFor": {
"message": "Show banner on $origin$ linking to $destination$",
"description": "Tooltip for option to alert the user with banner when visiting a specific wiki",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
},
"destination": {
"content": "$2",
"example": "Minecraft Wiki"
}
}
},
"settingsRedirectFor": {
"message": "Automatically redirect $origin$ to $destination$",
"description": "Tooltip for option to redirect to a specific wiki when visiting a specific wiki",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
},
"destination": {
"content": "$2",
"example": "Minecraft Wiki"
}
}
},
"settingsReplaceFor": {
"message": "Replace $origin$ search engine results with $destination$",
"description": "Tooltip for option to replace search results with links to a specific wiki",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
},
"destination": {
"content": "$2",
"example": "Minecraft Wiki"
}
}
},
"settingsHideFor": {
"message": "Hide $origin$ search engine results",
"description": "Tooltip for option to hide search results for a specific wiki",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
}
}
},
"settingsWikiFrom": {
"message": " (from $origin$)",
"description": "Tooltip for the origin of a specific wiki setting. Include a leading space when appropriate.",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
}
}
},
"settingsCustomWikiDelete": {
"message": "Delete",
"description": "Button to delete a custom wiki"
},
"settingsExtensionOn": {
"message": "Extension is on",
"description": "Notice that the extension is enabled"
},
"settingsExtensionOff": {
"message": "Extension is off",
"description": "Notice that the extension is disabled"
},
"popupOpenSettings": {
"message": "Open All Settings",
"description": "Button to open the settings page"
},
"popupDefault": {
"message": "Default behaviors (apply to all current and new wikis in future updates)",
"description": "Default behaviors section"
},
"popupWikiLegendWikiExp": {
"message": "When visiting Fandom, Fextralife, and Neoseeker wikis:",
"description": "Explanation for the icons in wiki experience"
},
"popupWikiLegendSearchExp": {
"message": "When search engine results include Fandom, Fextralife, or Neoseeker wikis with an independent alternative, IWB can:",
"description": "Explanation for the icons in search experience"
},
"popupSettingsPerWiki": {
"message": "Visit $linkStart$all settings$linkEnd$ to change behavior per-wiki.",
"description": "Notice to visit the settings page to change behavior per-wiki",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"popupSettingsOverride": {
"message": "Clicking an option above will override any per-wiki customizations you may have.",
"description": "Notice that clicking an option will override any per-wiki customizations"
},
"popupBreezeWikiSeeSettings": {
"message": "See settings",
"description": "See full settings page"
},
"popupBreezeWikiSeeSettingsLink": {
"message": "Change custom domain on $linkStart$full settings page$linkEnd$",
"description": "Notice to visit the settings page to change the custom BreezeWiki domain",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"guideTitle": {
"message": "Indie Wiki Buddy guide",
"description": "Title of the guide"
},
"guideBackToSettings": {
"message": "⇦ Back to Settings",
"description": "Button to return to the settings page"
},
"guideOverview": {
"message": "Overview",
"description": "Overview section"
},
"guideOverviewPara1": {
"message": "Indie Wiki Buddy provides a suite of features to help you discover independent wikis and improve your general wiki reading experience."
},
"guideOverviewPara2": {
"message": "When you visit a wiki on a large, corporate-run wiki host, this extension can notify or automatically redirect you to quality independent wikis when they're available. Search results in Google, Bing, DuckDuckGo, Brave, Ecosia, Kagi, Qwant, Startpage, Yahoo!, and Yandex can also be filtered, replacing non-independent wikis with links to independent counterpart (or hiding them completely)."
},
"guideOverviewPara3": {
"message": "We currently redirect from Fandom, Fextralife, and Neoseeker wikis to independent counterparts."
},
"guideOverviewPara4": {
"message": "Indie Wiki Buddy also supports $BreezeWiki$, a separate service that renders Fandom wikis without ads or bloat. This helps give you a more enjoyable reading experience when an independent wiki isn't available.",
"placeholders": {
"BreezeWiki": {
"content": "$1",
"example": "BreezeWiki"
}
}
},
"guideOverviewPara5": {
"message": "All these features can be toggled on or off, and you can set your preferences per-wiki as well. You're in full control!"
},
"guideGlobalSettingsHelp": {
"message": "Global settings help",
"description": "Global settings help section"
},
"guideGlobalSettingsHelpIntro": {
"message": "There are several general settings:",
"description": "Introduction paragraph of the general settings help"
},
"guideExtensionOnOff": {
"message": "Extension is on / off",
"description": "Extension on/off toggle"
},
"guideExtensionOnOffHelp": {
"message": "Enable/disable all Indie Wiki Buddy functionality at the click of a button."
},
"guideNotificationsHelp1": {
"message": "When this option is enabled, you will receive a desktop notification whenever you are automatically redirected to either an indie wiki or $BreezeWiki$. This is on by default.",
"placeholders": {
"BreezeWiki": {
"content": "$1",
"example": "BreezeWiki"
}
}
},
"guideNotificationsHelp2": {
"message": "If you aren't getting notifications when this is enabled, check your operating system's notification settings to ensure that your browser is allowed to send notifications."
},
"guideCrossLanguageHelp1": {
"message": "By default, Indie Wiki Buddy will keep users within the same language (e.g. only redirecting Spanish Fandom wikis to Spanish indie wikis). However, multilingual speakers may want to also use the many independent English wikis that are available. Enabling this option will redirect from non-English Fandom wikis to independent English wikis when one isn't available in the same language."
},
"guideCrossLanguageHelp2": {
"message": "Unfortunately this feature does not currently work for Fextralife wikis."
},
"guideChangelogHelp": {
"message": "Enable this option to have Indie Wiki Buddy's $linkStart$changelog$linkEnd$ opened in a new tab whenever it updates, so you can stay up-to-date on the latest changes.",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"guideGlobalSettingsHelpSearch": {
"message": "You can also configure your settings for filtering results in search engines:"
},
"guideTogglePerSearchEngine": {
"message": "Toggle filtering per search engine"
},
"guideTogglePerSearchEngineHelp1": {
"message": "By default, filtering is enabled for all search engines. Filtering is done based on the user's selected settings for each wiki. The default filtering setting for all wikis is to replace non-indie search results with buttons linking to indie counterparts."
},
"guideTogglePerSearchEngineHelp2": {
"message": "The current supported search engines are Google, Bing, DuckDuckGo, Brave, Ecosia, Kagi, Qwant, Startpage, Yahoo!, and Yandex."
},
"guideHiddenResultsBannerHelp1": {
"message": "When this option is enabled, a banner will be inserted at the top of search engine results when Indie Wiki Buddy has hidden results from Fandom, Fextralife, or Neoseeker wikis. This banner also lets you re-show the hidden results if you wish."
},
"guideHiddenResultsBannerHelp2": {
"message": "If you don't want to see any indication that results have been hidden, disable this option."
},
"guideReorderResultsHelp1": {
"message": "By default, Indie Wiki Buddy will re-order the results page on Google to move indie wiki results above the first non-indie (Fandom / Fextralife / Neoseeker) result, if they are further down the first page of results. This allows you to find the pages you're looking for on indie wikis quicker."
},
"guideReorderResultsHelp2": {
"message": "This feature is currently only available for Google, as it can be complex to maintain reliably."
},
"guideBreezeWiki": {
"message": "You can also set your desired setting for $BreezeWiki$, a separate service that renders Fandom wikis without ads or bloat. Note, BreezeWiki currently only supports English wikis.",
"description": "BreezeWiki section",
"placeholders": {
"BreezeWiki": {
"content": "$1",
"example": "BreezeWiki"
}
}
},
"guideBreezeWikiDisabledHelp": {
"message": "Do not redirect Fandom to BreezeWiki."
},
"guideBreezeWikiBannerHelp": {
"message": "At the top of English Fandom wikis, a small banner will be inserted with a link to take you to the BreezeWiki wiki."
},
"guideBreezeWikiRedirectHelp": {
"message": "Visiting any English Fandom wiki will immediately redirect you to view it through BreezeWiki. If automatic redirect to an independent wiki is enabled, the indepedent wiki will take priority."
},
"guideBreezeWikiHostHelp": {
"message": "Once you've enabled a BreezeWiki option, a dropdown will appear allowing you to select your preferred BreezeWiki host/mirror. If your selected BreezeWiki host goes down, you can come back to these settings and switch your host."
},
"guideWikiHelp": {
"message": "Individual wiki settings help",
"description": "Individual wiki settings help section"
},
"guideWikiHelpPara1": {
"message": "In the individual settings section of the settings page, you can configure your settings per-wiki. You can refer to the legend or hover over the icons to learn what each column controls."
},
"guideWikiHelpPara2": {
"message": "The first set of radio buttons controls what happens when you visit the listed non-indie wikis."
},
"guideDisable": {
"message": "Disable"
},
"guideDisableVisitHelp": {
"message": ": You will be neither notified of nor redirected to the independent counterpart. You will still be directed to BreezeWiki if it is turned on."
},
"guideRedirect": {
"message": "Redirect"
},
"guideRedirectHelp": {
"message": ": Be automatically redirected to the independent counterpart."
},
"guideAlert": {
"message": "Alert"
},
"guideAlertHelp": {
"message": ": Have a display banner at the top notifying you that an independent wiki is available. This will appear on both Fandom and BreezeWiki pages."
},
"guideWikiHelpPara3": {
"message": "The second set of radio buttons controls what happens to the non-indie wiki on Google, Bing, DuckDuckGo, and other search engines."
},
"guideDisableSearchHelp": {
"message": ": Search engine results are not affected."
},
"guideHide": {
"message": "Hide"
},
"guideHideHelp": {
"message": ": Results are hidden in search engines. A banner will be shown near the top of the page to inform you, and allow you to re-reveal the hidden results."
},
"guideReplace": {
"message": "Replace"
},
"guideReplaceHelp": {
"message": ": The original non-indie result is disabled, and a button is injected above to take you to the independent wiki."
},
"guideWikiHelpPara4": {
"message": "In the table header, clicking on the icons will apply that setting to all wikis in the table. In the second row, the stars represent the default settings for wikis that are added in future updates. By default, all wikis will be set to alert, with search engine replacement enabled."
},
"guideFeedback": {
"message": "Have questions or feedback?",
"description": "Feedback section"
},
"guideFeedbackPara1": {
"message": "If you're stuck or have questions, please don't hesitate to get in touch via the $linkStart$contact details$linkEnd$ at the bottom of Indie Wiki Buddy website.",
"placeholders": {
"linkStart": {
"content": "$1"
},
"linkEnd": {
"content": "$2"
}
}
},
"guideFeedbackPara2": {
"message": "Suggestions for improvements to the extension are also welcome!"
},
"notificationTitle": {
"message": "You've been redirected!",
"description": "Notification title for being redirected"
},
"notificationMessage": {
"message": "Indie Wiki Buddy has sent you from $origin$ to $destination$!",
"description": "Notification message for being redirected",
"placeholders": {
"origin": {
"content": "$1",
"example": "Minecraft Fandom Wiki"
},
"destination": {
"content": "$2",
"example": "Minecraft Wiki"
}
}
},
"notificationTitleBreezeWiki": {
"message": "You've been redirected to BreezeWiki!",
"description": "Notification title for being redirected to BreezeWiki"
},
"notificationMessageBreezeWiki": {
"message": "Indie Wiki Buddy has sent you to BreezeWiki for a cleaner, ad-free experience on Fandom.",
"description": "Notification message for being redirected to BreezeWiki"
}
}

View File

@ -146,8 +146,8 @@ function redirectToBreezeWiki(storage, tabId, url) {
extensionAPI.notifications.create(notifID, {
"type": "basic",
"iconUrl": 'images/logo-48.png',
"title": "You've been redirected to BreezeWiki!",
"message": "Indie Wiki Buddy has sent you to BreezeWiki for a cleaner, ad-free experience on Fandom."
"title": extensionAPI.i18n.getMessage('notificationTitleBreezeWiki'),
"message": extensionAPI.i18n.getMessage('notificationMessageBreezeWiki')
});
// Self-clear notification after 6 seconds
setTimeout(() => { extensionAPI.notifications.clear(notifID); }, 6000);
@ -228,8 +228,8 @@ async function main(url, tabId) {
extensionAPI.notifications.create(notifID, {
"type": "basic",
"iconUrl": 'images/logo-48.png',
"title": "You've been redirected!",
"message": "Indie Wiki Buddy has sent you from " + matchingSite['origin'] + " to " + matchingSite['destination']
"title": extensionAPI.i18n.getMessage('notificationTitle'),
"message": extensionAPI.i18n.getMessage('notificationMessage', [matchingSite['origin'], matchingSite['destination']])
});
// Self-clear notification after 6 seconds
setTimeout(() => { extensionAPI.notifications.clear(notifID); }, 6000);

View File

@ -113,7 +113,7 @@ p {
padding: var(--header-padding);
white-space: nowrap;
background-color: var(--secondary-color);
}
@ -143,7 +143,7 @@ p {
line-height: 1.3em;
}
#notificationBannerContainer span {
#notificationBannerContainer > span {
padding: .5rem 1rem;
display: none;
}

View File

@ -1,13 +1,14 @@
{
"name": "Indie Wiki Buddy",
"name": "__MSG_extensionName__",
"version": "3.8.0",
"description": "Indie Wiki Buddy helps you discover quality, independent wikis through alerts, redirects, and search filtering.",
"description": "__MSG_extensionDescription__",
"permissions": [
"storage",
"webRequest",
"notifications",
"scripting"
],
"default_locale": "en",
"icons": {
"16": "images/logo-16.png",
"32": "images/logo-32.png",

View File

@ -1,7 +1,8 @@
{
"name": "Indie Wiki Buddy",
"name": "__MSG_extensionName__",
"version": "3.8.0",
"description": "Indie Wiki Buddy helps you discover quality, independent wikis through alerts, redirects, and search filtering.",
"description": "__MSG_extensionDescription__",
"default_locale": "en",
"permissions": [
"storage",
"webRequest",

View File

@ -287,7 +287,7 @@ function populateBreezewikiHosts(breezewikiHosts, selectedHost, customHostName)
// Add custom BreezeWiki host option:
let customOption = document.createElement('option');
customOption.value = 'CUSTOM';
customOption.textContent = 'Custom host...';
customOption.textContent = extensionAPI.i18n.getMessage('settingsBreezeWikiCustomHostOption');
breezewikiHostSelect.appendChild(customOption);
breezewikiHostSelect.value = selectedHost;
@ -366,4 +366,27 @@ async function loadBreezewikiOptions() {
extensionAPI.storage.sync.set({ 'breezewikiHost': host });
}
});
}
}
// Somehow this has to be done manually
document.querySelectorAll('[data-msg]').forEach(element => {
// Check data-msg-ph-* attributes for placeholder text
// iterate
const placeholders = [];
for (let i = 1; i <= 9; i++) {
let ph = element.getAttribute(`data-msg-ph-${i}`);
if (ph) {
placeholders.push(ph);
}
}
element.innerHTML = extensionAPI.i18n.getMessage(element.dataset.msg, placeholders);
});
document.querySelectorAll('[data-msg-attr]').forEach(element => {
const attrs = element.dataset.msgAttr.split(',');
attrs.forEach(attr => {
const [key, value] = attr.split('=');
element.setAttribute(key, extensionAPI.i18n.getMessage(value));
});
});

24
pages/guide/guide.js Normal file
View File

@ -0,0 +1,24 @@
const extensionAPI = typeof browser === "undefined" ? chrome : browser;
// Somehow this has to be done manually
document.querySelectorAll('[data-msg]').forEach(element => {
// Check data-msg-ph-* attributes for placeholder text
// iterate
const placeholders = [];
for (let i = 1; i <= 9; i++) {
let ph = element.getAttribute(`data-msg-ph-${i}`);
if (ph) {
placeholders.push(ph);
}
}
element.innerHTML = extensionAPI.i18n.getMessage(element.dataset.msg, placeholders);
});
document.querySelectorAll('[data-msg-attr]').forEach(element => {
const attrs = element.dataset.msgAttr.split(',');
attrs.forEach(attr => {
const [key, value] = attr.split('=');
element.setAttribute(key, extensionAPI.i18n.getMessage(value));
});
});

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<link rel="icon" href="../../images/logo.png" />
<title>Indie Wiki Buddy settings</title>
<title data-msg="guideTitle"></title>
<link rel="stylesheet" href="../../css/common.css" type="text/css">
<link rel="stylesheet" href="../../css/guide.css" type="text/css">
</head>
@ -13,213 +13,157 @@
<body>
<div id="container">
<div id="header">
<h1>Indie Wiki Buddy guide</h1>
<h1 data-msg="guideTitle"></h1>
</div>
<div id="links">
<a href="../settings/index.html">⇦ Back to Settings</a>
<a href="../settings/index.html" data-msg="guideBackToSettings"></a>
</div>
<div id="content">
<h2>Overview</h2>
<p>
Indie Wiki Buddy provides a suite of features to help you discover independent wikis and improve your general
wiki reading experience.
<br /><br />
When you visit a wiki on a large, corporate-run wiki host, this extension can notify or automatically redirect
you to quality independent wikis when they're available.
Search results in Google, Bing, DuckDuckGo, Brave, Ecosia, Kagi, Qwant, Startpage, Yahoo!, and Yandex
can also be filtered, replacing non-independent wikis with links to independent counterpart
(or hiding them completely).
<br /><br />
We currently redirect from Fandom, Fextralife, and Neoseeker wikis to independent counterparts.
<br /><br />
Indie Wiki Buddy also supports <a href="https://breezewiki.com/">BreezeWiki</a>, a separate service that renders
Fandom wikis without ads or bloat.
This helps give you a more enjoyable reading experience when an independent wiki isn't available.
<br /><br />
All these features can be toggled on or off, and you can set your preferences per-wiki as well. You're in full
control!
</p>
<h2>Global settings help</h2>
<p>
There are several general settings:
<h2 data-msg="guideOverview"></h2>
<p data-msg="guideOverviewPara1"></p>
<p data-msg="guideOverviewPara2"></p>
<p data-msg="guideOverviewPara3"></p>
<p
data-msg="guideOverviewPara4"
data-msg-ph-1="<a href='https://breezewiki.com/'>BreezeWiki</a>">
</p>
<p data-msg="guideOverviewPara5"></p>
<h2 data-msg="guideGlobalSettingsHelp"></h2>
<p data-msg="guideGlobalSettingsHelpIntro"></p>
<ul>
<li>
<b><span aria-hidden="true">🔋</span> Extension is on / off</b>
<b><span aria-hidden="true">🔋</span>&nbsp;<span data-msg="guideExtensionOnOff"></span></b>
<br />
Enable/disable all Indie Wiki Buddy functionality at the click of a button.
<span data-msg="guideExtensionOnOffHelp"></span>
</li>
<br />
<li>
<b><span aria-hidden="true">🔔</span> Desktop notifications for redirections</b>
<b><span aria-hidden="true">🔔</span>&nbsp;<span data-msg="settingsNotifications"></span></b>
<br />
When this option is enabled, you will receive a desktop notification whenever you are
automatically redirected to either an indie wiki or <a href="https://breezewiki.com/">BreezeWiki</a>.
This is on by default.
<span data-msg="guideNotificationsHelp1" data-msg-ph-1="<a href='https://breezewiki.com/'>BreezeWiki</a>"></span>
<br />
<br />
If you aren't getting notifications when this is enabled, check your operating system's notification
settings to ensure that your browser is allowed to send notifications.
<span data-msg="guideNotificationsHelp2"></span>
</li>
<br />
<li>
<b><span aria-hidden="true">🌐</span> Redirect non-English Fandom wikis to
indie English wikis there is no same-lang wiki</b>
<b><span aria-hidden="true">🌐</span>&nbsp;<span data-msg="settingsCrossLanguage"></span></b>
<br />
By default, Indie Wiki Buddy will keep users within the same language
(e.g. only redirecting Spanish Fandom wikis to Spanish indie wikis).
However, multilingual speakers may want to also use the many independent English wikis that are available.
Enabling this option will redirect from non-English Fandom wikis
to independent English wikis when one isn't available in the same language.
<span data-msg="guideCrossLanguageHelp1"></span>
<br /><br />
Unfortunately this feature does not currently work for Fextralife wikis.
<span data-msg="guideCrossLanguageHelp2"></span>
</li>
<br />
<li>
<b><span aria-hidden="true">📁</span> Open changelog when Indie Wiki Buddy is updated</b>
<b><span aria-hidden="true">📁</span>&nbsp;<span data-msg="settingsChangelog"></span></b>
<br />
Enable this option to have Indie Wiki Buddy's <a href="https://getindie.wiki/changelog/">changelog</a>
opened in a new tab whenever it updates, so you can stay up-to-date on the latest changes.
<p
data-msg="guideChangelogHelp"
data-msg-ph-1="<a href='https://getindie.wiki/changelog/'>"
data-msg-ph-2="</a>">
</p>
</li>
</ul>
<p>
You can also configure your settings for filtering results in search engines:
</p>
<p data-msg="guideGlobalSettingsHelpSearch"></p>
<ul>
<li>
<b><img src="../../images/toggles.png" height="12" alt="" /> Toggle filtering per search engine</b>
<b><img src="../../images/toggles.png" height="12" alt="" />&nbsp;<span data-msg="guideTogglePerSearchEngine"></span></b>
<br />
By default, filtering is enabled for all search engines.
Filtering is done based on the user's selected settings for each wiki.
The default filtering setting for all wikis is to replace
non-indie search results with buttons linking to indie counterparts.
<span data-msg="guideTogglePerSearchEngineHelp1"></span>
<br /><br />
The current supported search engines are
Google, Bing, DuckDuckGo, Brave, Ecosia, Kagi, Qwant, Startpage, Yahoo!, and Yandex.
<span data-msg="guideTogglePerSearchEngineHelp2"></span>
</li>
<br />
<li>
<b><img src="../../images/toggle-banner.png" height="12" alt="" /> On search engines, show banner when
non-indie results are hidden</b>
<b><img src="../../images/toggle-banner.png" height="12" alt="" />&nbsp;<span data-msg="settingsHiddenResultsBanner"></span></b>
<br />
When this option is enabled,
a banner will be inserted at the top of search engine results when Indie Wiki Buddy
has hidden results from Fandom, Fextralife, or Neoseeker wikis.
This banner also lets you re-show the hidden results if you wish.
<span data-msg="guideHiddenResultsBannerHelp1"></span>
<br />
<br />
If you don't want to see any indication that results have been hidden, disable this option.
<span data-msg="guideHiddenResultsBannerHelp2"></span>
</li>
<br />
<li>
<b><img src="../../images/toggle-move-up.png" height="12" alt="" /> On Google, move indie wikis above
non-indie results and hide duplicates</b>
<b><img src="../../images/toggle-move-up.png" height="12" alt="" />&nbsp;<span data-msg="settingsReorderResults"></span></b>
<br />
By default, Indie Wiki Buddy will re-order the results page on Google to move indie wiki results above the
first non-indie (Fandom / Fextralife / Neoseeker) result, if they are further down the first page of results.
This allows you to find the pages you're looking for on indie wikis quicker.
<span data-msg="guideReorderResultsHelp1"></span>
<br /><br />
This feature is currently only available for Google, as it can be complex to maintain reliably.
<span data-msg="guideReorderResultsHelp2"></span>
</li>
</ul>
<p>
You can also set your desired setting for <a href="https://breezewiki.com/">BreezeWiki</a>,
a separate service that renders Fandom wikis without ads or bloat.
Note, BreezeWiki currently only supports English wikis.
</p>
<p data-msg="guideBreezeWiki" data-msg-ph-1="<a href='https://breezewiki.com/'>BreezeWiki</a>"></p>
<ul>
<li>
<b><img src="../../images/toggle-disabled.png" alt="" width="15"> BreezeWiki off</b>
<b><img src="../../images/toggle-disabled.png" alt="" width="15">&nbsp;<span data-msg="settingsBreezeWikiDisabled"></span></b>
<br />
Do not redirect Fandom to BreezeWiki.
<span data-msg="guideBreezeWikiDisabledHelp"></span>
</li>
<br />
<li>
<b><img src="../../images/toggle-alert.png" alt="" width="15"> Insert banner link to take you to
BreezeWiki</b>
<b><img src="../../images/toggle-alert.png" alt="" width="15">&nbsp;<span data-msg="settingsBreezeWikiBanner"></span></b>
<br />
At the top of English Fandom wikis, a small banner will be inserted with a link to take you to the BreezeWiki
wiki.
<span data-msg="guideBreezeWikiBannerHelp"></span>
</li>
<br />
<li>
<b><img src="../../images/toggle-redirect.png" alt="" width="15"> Automatically redirect Fandom to
BreezeWiki</b>
<b><img src="../../images/toggle-redirect.png" alt="" width="15">&nbsp;<span data-msg="settingsBreezeWikiRedirect"></span></b>
<br />
Visiting any English Fandom wiki will immediately redirect you to view it through BreezeWiki.
If automatic redirect to an independent wiki is enabled, the indepedent wiki will take priority.
<span data-msg="guideBreezeWikiRedirectHelp"></span>
</li>
</ul>
<p>
Once you've enabled a BreezeWiki option,
a dropdown will appear allowing you to select your preferred BreezeWiki host/mirror.
If your selected BreezeWiki host goes down, you can come back to these settings and switch your host.
</p>
<p data-msg="guideBreezeWikiHostHelp"></p>
<h2>Individual wiki settings help</h2>
<p>
In the individual settings section of the <a href="../settings/index.html" target="_blank">settings</a> page,
you can
configure your settings per-wiki.
You can refer to the legend or hover over the icons to learn what each column controls.
</p>
<p>
The first set of radio buttons controls what happens when you visit the listed non-indie wikis.
</p>
<h2 data-msg="guideWikiHelp"></h2>
<p
data-msg="guideWikiHelpPara1"
data-msg-ph-1="<a href='../settings/index.html' target='_blank'>"
data-msg-ph-2="</a>"></p>
<p data-msg="guideWikiHelpPara2"></p>
<ul class="no-markers">
<li>
<img src="../../images/toggle-disabled.png" alt="" width="15">
<b>Disable</b>: You will be neither notified of nor redirected to the independent counterpart.
You will still be directed to BreezeWiki if it is turned on.
<b data-msg="guideDisable"></b><span data-msg="guideDisableVisitHelp"></span>
</li>
<li>
<img src="../../images/toggle-redirect.png" alt="" width="15">
<b>Redirect</b>: Be automatically redirected to the independent counterpart.
<b data-msg="guideRedirect"></b><span data-msg="guideRedirectHelp"></span>
</li>
<li>
<img src="../../images/toggle-alert.png" alt="" width="15">
<b>Alert</b>: Have a display banner at the top notifying you that an independent wiki is available.
This will appear on both Fandom and BreezeWiki pages.
<b data-msg="guideAlert"></b><span data-msg="guideAlertHelp"></span>
</li>
</ul>
<p>
The second set of radio buttons controls what happens to the non-indie wiki on Google, Bing, DuckDuckGo, and
other search engines.
</p>
<p data-msg="guideWikiHelpPara3"></p>
<ul class="no-markers">
<li>
<img src="../../images/toggle-disabled.png" alt="" width="15">
<b>Disable</b>: Search engine results are not affected.
<b data-msg="guideDisable"></b><span data-msg="guideDisableSearchHelp"></span>
</li>
<li>
<img src="../../images/toggle-hide.png" alt="" width="15">
<b>Hide</b>: Results are hidden in search engines.
A banner will be shown near the top of the page to inform you, and allow you to re-reveal the hidden results.
<b data-msg="guideHide"></b><span data-msg="guideHideHelp"></span>
</li>
<li>
<img src="../../images/toggle-replace.png" alt="" width="15">
<b>Replace</b>: The original non-indie result is disabled, and a button is injected above to take you to the
indepedent wiki.
<b data-msg="guideReplace"></b><span data-msg="guideReplaceHelp"></span>
</li>
</ul>
<p data-msg="guideWikiHelpPara4"></p>
<h2 data-msg="guideFeedback"></h2>
<p>
In the table header, clicking on the icons will apply that setting to all wikis in the table.
In the second row, the stars represent the default settings for wikis that are added in future updates.
By default, all wikis will be set to alert, with search engine replacement enabled.
</p>
<h2>Have questions or feedback?</h2>
<p>
If you're stuck or have questions, please don't hesitate to get in touch via the
<a href="https://getindie.wiki/#contact">contact details</a>
at the bottom of Indie Wiki Buddy website.
<span
data-msg="guideFeedbackPara1"
data-msg-ph-1="<a href='https://getindie.wiki/#contact'>"
data-msg-ph-2="</a>"></span>
<br /><br />
Suggestions for improvements to the extension are also welcome!
<span data-msg="guideFeedbackPara2"></span>
</p>
</div>
</div>
</body>
<script type="text/javascript" src="guide.js"></script>
</html>
</html>

View File

@ -4,19 +4,17 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<title>Indie Wiki Buddy</title>
<title data-msg="extensionName"></title>
<link rel="stylesheet" href="../../css/common.css" type="text/css">
<link rel="stylesheet" href="../../css/popup.css" type="text/css">
</head>
<body>
<div id="header">
<h1>Indie Wiki Buddy</h1>
<h1 data-msg="extensionName">Indie Wiki Buddy</h1>
<div>
<div>
<button id="openSettingsButton">
Open All Settings
</button>
<button id="openSettingsButton" data-msg="popupOpenSettings"></button>
</div>
<div id="power">
<input id="powerCheckbox" type="checkbox" />
@ -27,100 +25,97 @@
</div>
</div>
<div id="links">
<a href="../guide/index.html" target="_blank">Guide</a>
<a href="https://getindie.wiki" target="_blank">Website</a>
<a href="https://getindie.wiki/changelog/" target="_blank">Changelog</a>
<a href="https://getindie.wiki/#submit" target="_blank">Submit a Wiki</a>
<a href="https://github.com/KevinPayravi/indie-wiki-buddy" target="_blank">Source Code</a>
<a href="../guide/index.html" data-msg="settingsGuide"></a>
<a href="https://getindie.wiki" target="_blank" data-msg="settingsWebsite"></a>
<a href="https://getindie.wiki/changelog/" target="_blank" data-msg="settingsChangelog"></a>
<a href="https://getindie.wiki/#submit" target="_blank" data-msg="settingsSubmitWiki"></a>
<a href="https://github.com/KevinPayravi/indie-wiki-buddy" target="_blank" data-msg="settingsSourceCode"></a>
</div>
<div id="notificationBannerContainer">
<span id="notificationBannerOpera">
Opera users: By default, Opera will block extensions from running on search engines.
Search engine access can be enabled per-extension by going to "about:extensions"
and selecting the "Allow access to search page results" option under Indie Wiki Buddy.
<a id="operaPermsHideLink" href="#">Hide this message</a>
<span data-msg="settingsBannerOpera"></span>
<a id="operaPermsHideLink" href="#" data-msg="settingsBannerHide"></a>
</span>
</div>
<div id="content">
<form name="options" class="options">
<fieldset id="defaultSettings">
<legend><span aria-hidden="true">⚙️</span> Default behaviors (apply to all current and new wikis in future
updates)</legend>
<legend><span aria-hidden="true">⚙️</span>&nbsp;<span data-msg="popupDefault"></span></legend>
<div role="radiogroup" aria-labelledby="defaultWikiActionLabel">
<span id="defaultWikiActionLabel">When visiting Fandom, Fextralife, and Neoseeker wikis:</span>
<span id="defaultWikiActionLabel" data-msg="popupWikiLegendWikiExp"></span>
<div class="radioGroup horizontal">
<label>
<input id="defaultWikiActionDisabledRadio" type="radio" name="defaultWikiAction" value="disabled" />
<img src="../../images/toggle-disabled.png" height="12" alt="" />
Do nothing
<span data-msg="settingsDisabled"></span>
</label>
<label>
<input id="defaultWikiActionAlertRadio" type="radio" name="defaultWikiAction" value="alert" />
<img src="../../images/toggle-alert.png" height="12" alt="" />
Show banner linking to indie wiki
<span data-msg="settingsAlert"></span>
</label>
<label>
<input id="defaultWikiActionRedirectRadio" type="radio" name="defaultWikiAction" value="redirect" />
<img src="../../images/toggle-redirect.png" height="12" alt="" />
Redirect to indie wiki
<span data-msg="settingsRedirect"></span>
</label>
</div>
</div>
<div role="radiogroup" aria-labelledby="defaultSearchActionLabel">
<span id="defaultSearchActionLabel">On search engines, when you see non-indie results with indie
alternatives:</span>
<span id="defaultSearchActionLabel" data-msg="popupWikiLegendSearchExp"></span>
<div class="radioGroup horizontal">
<label>
<input id="defaultSearchActionDisabledRadio" type="radio" name="defaultSearchAction" value="disabled" />
<img src="../../images/toggle-disabled.png" height="12" alt="" />
Do nothing
<span data-msg="settingsDisabled"></span>
</label>
<label>
<input id="defaultSearchActionAlertRadio" type="radio" name="defaultSearchAction" value="replace" />
<img src="../../images/toggle-replace.png" height="12" alt="" />
Replace non-indie results
<span data-msg="settingsReplace"></span>
</label>
<label>
<input id="defaultSearchActionRedirectRadio" type="radio" name="defaultSearchAction" value="hide" />
<img src="../../images/toggle-hide.png" height="12" alt="" />
Hide non-indie results
<span data-msg="settingsHide"></span>
</label>
</div>
</div>
<div class="center">
Visit <a id="openSettingsLink" href="#">all settings</a> to change behavior per-wiki.
<span
data-msg="popupSettingsPerWiki"
data-msg-ph-1="<a id='openSettingsLink' href='#'>"
data-msg-ph-2="</a>"></span>
<br />
Clicking an option above will override any per-wiki customizations you may have.
<span data-msg="popupSettingsOverride"></span>
</div>
</fieldset>
<fieldset id="generalSettings">
<legend><span aria-hidden="true">⚙️</span> General settings</legend>
<legend><span aria-hidden="true">⚙️</span>&nbsp;<span data-msg="settingsGeneral"></span></legend>
<div class="settingToggle">
<label>
<input id="notificationsCheckbox" type="checkbox" />
<span id="notificationsIcon" aria-hidden="true"></span>
Desktop notifications for
redirections
<span data-msg="settingsNotifications"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="crossLanguageCheckbox" type="checkbox" />
<span id="crossLanguageIcon" aria-hidden="true"></span>
Redirect non-English Fandom wikis to
indie English wikis there is no same-lang wiki
<span data-msg="settingsCrossLanguage"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="openChangelogCheckbox" type="checkbox" />
<span id="openChangelogIcon" aria-hidden="true"></span>
Open changelog when Indie Wiki Buddy is updated
<span data-msg="settingsOpenChangelog"></span>
</label>
</div>
</fieldset>
<fieldset id="generalSettings">
<legend><span aria-hidden="true">🔍</span> Search engine filtering </legend>
<legend><span aria-hidden="true">🔍</span>&nbsp;<span data-msg="settingsSearchEngineFiltering"></span></legend>
<div class="settingToggle searchEngineToggles">
<label>
<input id="googleCheckbox" data-search-engine="google" type="checkbox" />
@ -168,52 +163,58 @@
<label>
<input id="hiddenResultsBannerCheckbox" type="checkbox" />
<img src="../../images/toggle-banner.png" height="12" alt="" />
On search engines, show banner when non-indie results are hidden
<span data-msg="settingsHiddenResultsBanner"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="reorderResultsCheckbox" type="checkbox" />
<img src="../../images/toggle-move-up.png" height="12" alt="" />
On Google, move indie wikis above non-indie results and hide duplicates
<span data-msg="settingsReorderResults"></span>
</label>
</div>
</fieldset>
<fieldset id="breezewikiSettings">
<legend>
<span aria-hidden="true"></span> BreezeWiki alternative frontend for Fandom (<a id="breeezwikiLearnMore"
href="https://breezewiki.com/" target="_blank">learn more</a>)
<span aria-hidden="true"></span>&nbsp;
<span
data-msg="settingsBreezeWiki"
data-msg-ph-1="<a id='breeezwikiLearnMore' href='https://breezewiki.com/' target='_blank'>"
data-msg-ph-2="</a>"></span>
</legend>
<div role="radiogroup">
<div class="radioGroup vertical">
<label>
<input id="breeezwikiSettingDisabledRadio" type="radio" name="breezewikiSetting" value="off" />
<img src="../../images/toggle-disabled.png" height="12" alt="" />
BreezeWiki off
<span data-msg="settingsBreezeWikiDisabled"></span>
</label>
<label>
<input id="breezewikiSettingBannerRadio" type="radio" name="breezewikiSetting" value="banner" />
<img src="../../images/toggle-alert.png" height="12" alt="" />
Insert banner link to take you to BreezeWiki
<span data-msg="settingsBreezeWikiBanner"></span>
</label>
<label>
<input id="breezewikiSettingRedirectRadio" type="radio" name="breezewikiSetting" value="redirect" />
<img src="../../images/toggle-redirect.png" height="12" alt="" />
Automatically redirect Fandom to BreezeWiki
<span data-msg="settingsBreezeWikiRedirect"></span>
</label>
</div>
</div>
<div id="breezewikiHost" class="settingToggle">
<label>
BreezeWiki host:
<span data-msg="settingsBreezeWikiHost"></span>
<select name="breezewikiHost" id="breezewikiHostSelect"></select>
</label>
<label id="breezewikiCustomHost">
Custom BreezeWiki domain:
<span data-msg="settingsBreezeWikiCustomHost"></span>
<input disabled type="text" id="customBreezewikiHost" name="customBreezewikiHost"
placeholder="See full settings page" size="30" />
<span id="breezewikiCustomHostStatus">Change custom domain on <a href="../settings/index.html"
target="_blank">full settings page</a></span>
data-msg-attr="placeholder=popupBreezeWikiSeeSettings" size="30" />
<span
id="breezewikiCustomHostStatus"
data-msg="popupBreezeWikiSeeSettingsLink"
data-msg-ph-1="<a href='../settings/index.html' target='_blank'>"
data-msg-ph-2="</a>"></span>
</label>
</div>
</fieldset>

View File

@ -9,10 +9,11 @@ function setPower(setting, storeSetting = true) {
}
var powerImage = document.getElementById('powerImage');
powerImage.src = '../../images/power-' + setting + '.png';
powerImage.alt = 'Indie Wiki Buddy is ' + setting;
if (setting === 'on') {
powerImage.alt = extensionAPI.i18n.getMessage('settingsExtensionOn');
document.getElementById('powerCheckbox').checked = true;
} else {
powerImage.alt = extensionAPI.i18n.getMessage('settingsExtensionOff');
document.getElementById('powerCheckbox').checked = false;
}
@ -129,4 +130,4 @@ document.addEventListener('DOMContentLoaded', () => {
});
// Run v3 data migration:
migrateData();
migrateData();

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<link rel="icon" href="../../images/logo.png" />
<title>Indie Wiki Buddy settings</title>
<title data-msg="settingsTitle"></title>
<link rel="stylesheet" href="../../css/common.css" type="text/css">
<link rel="stylesheet" href="../../css/settings.css" type="text/css">
</head>
@ -14,24 +14,22 @@
<div id="container">
<div id="header">
<span id="version"></span>
<h1>Indie Wiki Buddy</h1>
<h1 data-msg="extensionName"></h1>
</div>
<div id="links">
<a href="../guide/index.html">Guide</a>
<a href="https://getindie.wiki" target="_blank">Website</a>
<a href="https://getindie.wiki/changelog/" target="_blank">Changelog</a>
<a href="https://getindie.wiki/#submit" target="_blank">Submit a Wiki</a>
<a href="https://github.com/KevinPayravi/indie-wiki-buddy" target="_blank">Source Code</a>
<a href="../guide/index.html" data-msg="settingsGuide"></a>
<a href="https://getindie.wiki" target="_blank" data-msg="settingsWebsite"></a>
<a href="https://getindie.wiki/changelog/" target="_blank" data-msg="settingsChangelog"></a>
<a href="https://getindie.wiki/#submit" target="_blank" data-msg="settingsSubmitWiki"></a>
<a href="https://github.com/KevinPayravi/indie-wiki-buddy" target="_blank" data-msg="settingsSourceCode"></a>
</div>
<div id="notificationBannerContainer">
<span id="notificationBannerOpera">
Opera users: By default, Opera will block extensions from running on search engines.
Search engine access can be enabled per-extension by going to "about:extensions"
and selecting the "Allow access to search page results" option under Indie Wiki Buddy.
<a id="operaPermsHideLink" href="#">Hide this message</a>
<span data-msg="settingsBannerOpera"></span>
<a id="operaPermsHideLink" href="#" data-msg="settingsBannerHide"></a>
</span>
<span id="notificationBannerReview">
Enjoying Indie Wiki Buddy? Please leave a review!
<span data-msg="settingsBannerReview"></span>
<div id="notificationBannerReviewLinks">
<a id="reviewReminderChromeLink" target="_blank"
href="https://chrome.google.com/webstore/detail/indie-wiki-buddy/fkagelmloambgokoeokbpihmgpkbgbfm">Chrome</a>
@ -39,46 +37,37 @@
<a id="reviewReminderFirefoxLink" target="_blank"
href="https://addons.mozilla.org/en-US/firefox/addon/indie-wiki-buddy/">Firefox</a>
<div>|</div>
<a id="reviewReminderHideLink" href="#">Hide this message</a>
<a id="reviewReminderHideLink" href="#" data-msg="settingsBannerHide"></a>
</div>
<br />
Having issues or ideas for improvement? Please <a target="_blank" href="https://getindie.wiki/#contact">contact
me</a>!
<span
data-msg="settingsBannerReviewContact"
data-msg-ph-1="<a target='_blank' href='https://getindie.wiki/#contact'>"
data-msg-ph-2="</a>"></span>
</span>
</div>
<div id="content">
<div id="firstInstallInfo">
Thanks for installing Indie Wiki Buddy! Let's get you set up.
<br /><br />
Use the links above to see the full guide, submit new wikis, or contact the developer.
<br /><br />
In the settings below, you can toggle features on and off.
This includes the option to enable <a href="https://breezewiki.com/" target="_blank">BreezeWiki</a>,
an alternative frontend that renders Fandom wikis without ads or bloat.
<br /><br />
Below that, you can individually configure what happens when you visit Fandom, Fextralife, and Neoseeker
wikis that have an independent alternative, as well as what happens to their results in search engines.
For visiting wikis, you can choose to be
<img src="../../images/toggle-alert.png" width="12" alt="" /> alerted (default)
or
<img src="../../images/toggle-redirect.png" width="12" alt="" />
automatically redirected.
On search engines, you can choose to
<img src="../../images/toggle-replace.png" width="12" alt="" /> replace (default)
or
<img src="../../images/toggle-hide.png" width="12" alt="" /> hide
search results.
<br /><br />
You can access these settings in the future via the extension's icon
<img src="../../images/logo-32.png" width="15" alt="icon of an arrow pointing to the right" />
at the top right of your browser. If you don't see the icon,
it may be in the extension dropdown, which can be opened via the jigsaw icon
<img src="../../images/jigsaw.png" width="15" alt="" /> (also at the top right of your browser).
<p data-msg="firstInstallInfo1"></p>
<p data-msg="firstInstallInfo2"></p>
<p
data-msg="firstInstallInfo3"
data-msg-ph-1="<a href='https://breezewiki.com/' target='_blank'>BreezeWiki</a>"></p>
<p
data-msg="firstInstallInfo4"
data-msg-ph-1="<img src='../../images/toggle-alert.png' width='12' alt='' />"
data-msg-ph-2="<img src='../../images/toggle-redirect.png' width='12' alt='' />"
data-msg-ph-3="<img src='../../images/toggle-replace.png' width='12' alt='' />"
data-msg-ph-4="<img src='../../images/toggle-hide.png' width='12' alt='' />"></p>
<p
data-msg="firstInstallInfo5"
data-msg-ph-1="<img src='../../images/logo-32.png' width='15' alt='' />"
data-msg-ph-2="<img src='../../images/jigsaw.png' width='15' alt='' />"></p>
<hr />
</div>
<form name="options" class="options">
<fieldset id="generalSettings">
<legend><span aria-hidden="true">⚙️</span> General settings</legend>
<legend><span aria-hidden="true">⚙️</span>&nbsp;<span data-msg="settingsGeneral"></span></legend>
<div class="settingToggle">
<label>
<input id="powerCheckbox" type="checkbox" />
@ -90,28 +79,26 @@
<label>
<input id="notificationsCheckbox" type="checkbox" />
<span id="notificationsIcon" aria-hidden="true"></span>
Desktop notifications for
redirections
<span data-msg="settingsNotifications"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="crossLanguageCheckbox" type="checkbox" />
<span id="crossLanguageIcon" aria-hidden="true"></span>
Redirect non-English Fandom wikis to
indie English wikis when no same-language wiki exists
<span data-msg="settingsCrossLanguage"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="openChangelogCheckbox" type="checkbox" />
<span id="openChangelogIcon" aria-hidden="true"></span>
Open changelog when Indie Wiki Buddy is updated
<span data-msg="settingsOpenChangelog"></span>
</label>
</div>
</fieldset>
<fieldset id="generalSettings">
<legend><span aria-hidden="true">🔍</span> Search engine filtering </legend>
<legend><span aria-hidden="true">🔍</span>&nbsp;<span data-msg="settingsSearchEngineFiltering"></span></legend>
<div class="settingToggle searchEngineToggles">
<label>
<input id="googleCheckbox" data-search-engine="google" type="checkbox" />
@ -159,59 +146,61 @@
<label>
<input id="hiddenResultsBannerCheckbox" type="checkbox" />
<img src="../../images/toggle-banner.png" height="12" alt="" />
On search engines, show banner when non-indie results are hidden
<span data-msg="settingsHiddenResultsBanner"></span>
</label>
</div>
<div class="settingToggle">
<label>
<input id="reorderResultsCheckbox" type="checkbox" />
<img src="../../images/toggle-move-up.png" height="12" alt="" />
On Google, move indie wikis above non-indie results and hide duplicates
<span data-msg="settingsReorderResults"></span>
</label>
</div>
</fieldset>
<fieldset id="breezewikiSettings">
<legend>
<span aria-hidden="true"></span> BreezeWiki alternative frontend for Fandom (<a id="breeezwikiLearnMore"
href="https://breezewiki.com/" target="_blank">learn more</a>)
<span aria-hidden="true"></span>&nbsp;
<span
data-msg="settingsBreezeWiki"
data-msg-ph-1="<a id='breeezwikiLearnMore' href='https://breezewiki.com/' target='_blank'>"
data-msg-ph-2="</a>"></span>
</legend>
<div role="radiogroup">
<div class="radioGroup vertical">
<label>
<input id="breeezwikiSettingDisabledRadio" type="radio" name="breezewikiSetting" value="off" />
<img src="../../images/toggle-disabled.png" height="12" alt="" />
BreezeWiki off
<span data-msg="settingsBreezeWikiDisabled"></span>
</label>
<label>
<input id="breezewikiSettingBannerRadio" type="radio" name="breezewikiSetting" value="banner" />
<img src="../../images/toggle-alert.png" height="12" alt="" />
Insert banner link to take you to BreezeWiki
<span data-msg="settingsBreezeWikiBanner"></span>
</label>
<label>
<input id="breezewikiSettingRedirectRadio" type="radio" name="breezewikiSetting" value="redirect" />
<img src="../../images/toggle-redirect.png" height="12" alt="" />
Automatically redirect Fandom to BreezeWiki
<span data-msg="settingsBreezeWikiRedirect"></span>
</label>
</div>
</div>
<div id="breezewikiHost" class="settingToggle">
<label>
BreezeWiki host:
<span data-msg="settingsBreezeWikiHost"></span>
<select name="breezewikiHost" id="breezewikiHostSelect"></select>
</label>
<label id="breezewikiCustomHost">
Custom BreezeWiki domain:
<span data-msg="settingsBreezeWikiCustomHost"></span>
<input type="text" id="customBreezewikiHost" name="customBreezewikiHost" placeholder="bw.example.com"
size="30" />
<button id="setCustomBreezewikiDomain" type="button">
Set domain
<button id="setCustomBreezewikiDomain" type="button" data-msg="settingsBreezeWikiCustomHostSet">
</button>
<span id="breezewikiCustomHostStatus"></span>
</label>
</div>
</fieldset>
<!--
Custom search engines are currently disabled
Custom search engines are currently disabled
due to content scripts being unregistered on-update.
-->
<!-- <fieldset id="customSearchEngines">
@ -230,69 +219,63 @@
</div>
</div>
</fieldset> -->
<h2>Individual wiki settings</h2>
<h2 data-msg="settingsWiki"></h2>
<fieldset id="legend">
<legend>
<span aria-hidden="true"></span> Icon legend
<span aria-hidden="true"></span>&nbsp;<span data-msg="settingsWikiLegend"></span>
</legend>
<span class="text-sm">When visiting Fandom, Fextralife, or Neoseeker wikis with an independent alternative,
IWB
can:</span>
<span class="text-sm" data-msg="settingsWikiLegendWikiExp"></span>
<div>
<div>
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsDisabled"></span>
</div>
<div>
<img src="../../images/toggle-alert.png" width="16" height="16" alt="" /> Display banner
linking to indie wiki
<img src="../../images/toggle-alert.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsAlert"></span>
</div>
<div>
<img src="../../images/toggle-redirect.png" width="16" height="16" alt="" /> Redirect to
indie wiki
<img src="../../images/toggle-redirect.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsRedirect"></span>
</div>
</div>
<span class="text-sm">When search engine results include Fandom, Fextralife, or Neoseeker wikis
with an independent alternative, IWB can:</span>
<span class="text-sm" data-msg="settingsWikiLegendSearchExp"></span>
<div>
<div>
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" /> Do nothing
<img src="../../images/toggle-disabled.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsDisabled"></span>
</div>
<div>
<img src="../../images/toggle-replace.png" width="16" height="16" alt="" /> Replace result with link
to indie wiki
<img src="../../images/toggle-replace.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsReplace"></span>
</div>
<div>
<img src="../../images/toggle-hide.png" width="16" height="16" alt="" /> Hide the result
<img src="../../images/toggle-hide.png" width="16" height="16" alt="" />&nbsp;<span data-msg="settingsHide"></span>
</div>
</div>
</fieldset>
<div id="wikiFiltersContainer">
<div>
<div id="langSelectCaption">Filter wikis by language:</div>
<div id="langSelectCaption" data-msg="settingsFilterByLanguage"></div>
<select name="lang" id="langSelect">
<option value="ALL" selected>All languages</option>
<option value="DE">[DE] German / Deutsch</option>
<option value="EN">[EN] English</option>
<option value="ES">[ES] Spanish / Español</option>
<option value="FI">[FI] Finnish / suomi</option>
<option value="FR">[FR] French / Français</option>
<option value="HU">[HU] Hungarian / Magyar</option>
<option value="IT">[IT] Italian / Italiano</option>
<option value="JA">[JA] Japanese / 日本語</option>
<option value="KO">[KO] Korean / 한국어</option>
<option value="LZH">[LZH] Classical Chinese / 文言文</option>
<option value="PL">[PL] Polish / Polski</option>
<option value="PT">[PT] Portuguese / Português</option>
<option value="RU">[RU] Russian / Русский язык</option>
<option value="TH">[TH] Thai / ภาษาไทย</option>
<option value="TOK">[TOK] Toki Pona</option>
<option value="UK">[UK] Ukrainian / Українська</option>
<option value="ZH">[ZH] Chinese / 中文</option>
<option value="ALL" selected data-msg="settingsLangAll"></option>
<option value="DE" data-msg="settingsLangDE"></option>
<option value="EN" data-msg="settingsLangEN"></option>
<option value="ES" data-msg="settingsLangES"></option>
<option value="FI" data-msg="settingsLangFI"></option>
<option value="FR" data-msg="settingsLangFR"></option>
<option value="HU" data-msg="settingsLangHU"></option>
<option value="IT" data-msg="settingsLangIT"></option>
<option value="JA" data-msg="settingsLangJA"></option>
<option value="KO" data-msg="settingsLangKO"></option>
<option value="LZH" data-msg="settingsLangLZH"></option>
<option value="PL" data-msg="settingsLangPL"></option>
<option value="PT" data-msg="settingsLangPT"></option>
<option value="RU" data-msg="settingsLangRU"></option>
<option value="TH" data-msg="settingsLangTH"></option>
<option value="TOK" data-msg="settingsLangTOK"></option>
<option value="UK" data-msg="settingsLangUK"></option>
<option value="ZH" data-msg="settingsLangZH"></option>
</select>
</div>
<div>
<div id="filterInputCaption">Filter wikis by name:</div>
<input id="filterInput" type="text" name="filterInput" placeholder="Enter wiki name..." />
<div id="filterInputCaption" data-msg="settingsFilterByName"></div>
<input id="filterInput" type="text" name="filterInput" data-msg-attr="placeholder=settingsNameFilterPlaceholder" />
</div>
</div>
<div class="sticky">
@ -300,43 +283,37 @@
<div>
<span></span>
<div>
<div>Wiki experience</div>
<div>Search experience</div>
<div data-msg="settingsWikiExp"></div>
<div data-msg="settingsSearchExp"></div>
</div>
</div>
</div>
<div id="togglesKeys" class="toggles togglesHeader">
<div>
<span>Click icon to set all wikis in column:</span>
<span data-msg="settingsSetColumn"></span>
<div class="inputsContainer">
<div>
<button id="setAllDisabled" type="button" data-title="Do nothing when visiting non-indie wiki"
aria-label="Do nothing when visiting non-indie wiki">
<button id="setAllDisabled" type="button" data-msg-attr="data-title=settingsDisabled,aria-label=settingsDisabled">
</button>
</div>
<div>
<button id="setAllAlert" type="button" data-title="Show banner when indie wiki is available"
aria-label="Show banner when indie wiki is available">
<button id="setAllAlert" type="button" data-msg-attr="data-title=settingsAlert,aria-label=settingsAlert">
</button>
</div>
<div>
<button id="setAllRedirect" type="button" data-title="Automatically redirect to indie wiki"
aria-label="Automatically redirect to indie wiki">
<button id="setAllRedirect" type="button" data-msg-attr="data-title=settingsRedirect,aria-label=settingsRedirect">
</button>
</div>
<div>
<button id="setAllSearchEngineDisabled" type="button" data-title="Do nothing on search engines"
aria-label="Do nothing on search engines">
<button id="setAllSearchEngineDisabled" type="button" data-msg-attr="data-title=settingsDisabled,aria-label=settingsDisabled">
</button>
</div>
<div>
<button id="setAllSearchEngineReplace" type="button" data-title="Replace non-indie search results"
aria-label="Replace non-indie search results">
<button id="setAllSearchEngineReplace" type="button" data-msg-attr="data-title=settingsReplace,aria-label=settingsReplace">
</button>
</div>
<div>
<button id="setAllSearchEngineHide" type="button"
data-title="Hide non-indie wiki from search results">
<button id="setAllSearchEngineHide" type="button" data-msg-attr="data-title=settingsHide,aria-label=settingsHide">
</button>
</div>
</div>
@ -345,38 +322,38 @@
</div>
<div id="togglesDefaults" class="toggles togglesHeader">
<div>
<span>Default for new wikis in future updates:</span>
<span data-msg="settingsNewWiki"></span>
<div class="inputsContainer">
<div>
<input id="defaultWikiActionDisabledRadio" type="radio" name="defaultWikiAction" value="disabled"
aria-label="Do nothing" />
<label data-title="Do nothing when visiting non-indie wiki"
data-msg-attr="aria-label=settingsDisabled" />
<label data-msg-attr="data-title=settingsDisabled"
for="defaultWikiActionDisabledRadio"></label>
</div>
<div>
<input id="defaultWikiActionAlertRadio" type="radio" name="defaultWikiAction" value="alert"
aria-label="Display banner linking to indie wiki" />
<label data-title="Show banner when indie wiki is available" for="defaultWikiActionAlertRadio"></label>
data-msg-attr="aria-label=settingsAlert" />
<label data-msg-attr="data-title=settingsAlert" for="defaultWikiActionAlertRadio"></label>
</div>
<div>
<input id="defaultWikiActionRedirectRadio" type="radio" name="defaultWikiAction" value="redirect"
aria-label="Redirect to indie wiki" />
<label data-title="Automatically redirect to indie wiki" for="defaultWikiActionRedirectRadio"></label>
data-msg-attr="aria-label=settingsRedirect" />
<label data-msg-attr="data-title=settingsRedirect" for="defaultWikiActionRedirectRadio"></label>
</div>
<div>
<input id="defaultSearchActionDisabledRadio" type="radio" name="defaultSearchAction" value="disabled"
aria-label="Do nothing" />
<label data-title="Do nothing on search engines" for="defaultSearchActionDisabledRadio"></label>
data-msg-attr="aria-label=settingsDisabled" />
<label data-msg-attr="data-title=settingsDisabled" for="defaultSearchActionDisabledRadio"></label>
</div>
<div>
<input id="defaultSearchActionReplaceRadio" type="radio" name="defaultSearchAction" value="replace"
aria-label="Replace non-indie results" />
<label data-title="Replace non-indie search results" for="defaultSearchActionReplaceRadio"></label>
data-msg-attr="aria-label=settingsReplace" />
<label data-msg-attr="data-title=settingsReplace" for="defaultSearchActionReplaceRadio"></label>
</div>
<div>
<input id="defaultSearchActionHideRadio" type="radio" name="defaultSearchAction" value="hide"
aria-label="Hide non-indie results" />
<label data-title="Hide non-indie wiki from search results" for="defaultSearchActionHideRadio"></label>
data-msg-attr="aria-label=settingsHide" />
<label data-msg-attr="data-title=settingsHide" for="defaultSearchActionHideRadio"></label>
</div>
</div>
</div>
@ -385,14 +362,11 @@
</form>
<hr />
<div id="footer">
<h2>Fun Stats</h2>
Alerted to indie wikis <span id="countAlerts"></span> times
<br />
Automatically redirected to indie wikis <span id="countRedirects"></span> times
<br />
Automatically redirected to BreezeWiki <span id="countBreezeWiki"></span> times
<br />
<span id="countSearchFilters"></span> search engine results filtered
<h2 data-msg="settingsFunStats"></h2>
<div data-msg="settingsFunStatsAlerts" data-msg-ph-1="<span id='countAlerts'></span>"></div>
<div data-msg="settingsFunStatsRedirects" data-msg-ph-1="<span id='countRedirects'></span>"></div>
<div data-msg="settingsFunStatsBreezeWiki" data-msg-ph-1="<span id='countBreezeWiki'></span>"></div>
<div data-msg="settingsFunStatsSearchFilters" data-msg-ph-1="<span id='countSearchFilters'></span>"></div>
</div>
</div>
</div>
@ -401,4 +375,4 @@
<script type="text/javascript" src="../common-page-functions.js"></script>
<script type="text/javascript" src="settings.js"></script>
</html>
</html>

View File

@ -77,7 +77,7 @@ async function loadOptions(lang, textFilter = '') {
inputDisabled.classList = 'toggleDisable';
inputDisabled.type = "radio";
inputDisabled.name = key + '-wiki-action';
inputDisabled.title = 'Do nothing for ' + sites[i].origins_label + ' on search engines';
inputDisabled.title = extensionAPI.i18n.getMessage('settingsDisableFor', [sites[i].origins_label]);
inputDisabled.lang = sites[i].language;
inputDisabled.setAttribute('data-wiki-key', key);
@ -87,7 +87,7 @@ async function loadOptions(lang, textFilter = '') {
inputAlert.classList = 'toggleAlert';
inputAlert.type = "radio";
inputAlert.name = key + '-wiki-action';
inputAlert.title = 'Show banner on ' + sites[i].origins_label + ' linking to ' + sites[i].destination;
inputAlert.title = extensionAPI.i18n.getMessage('settingsAlertFor', [sites[i].origins_label, sites[i].destination]);
inputAlert.lang = sites[i].language;
inputAlert.setAttribute('data-wiki-key', key);
@ -97,7 +97,7 @@ async function loadOptions(lang, textFilter = '') {
inputRedirect.classList = 'toggleRedirect';
inputRedirect.type = "radio";
inputRedirect.name = key + '-wiki-action';
inputRedirect.title = 'Automatically redirect ' + sites[i].origins_label + ' to ' + sites[i].destination;
inputRedirect.title = extensionAPI.i18n.getMessage('settingsRedirectFor', [sites[i].origins_label, sites[i].destination]);
inputRedirect.lang = sites[i].language;
inputRedirect.setAttribute('data-wiki-key', key);
@ -107,7 +107,7 @@ async function loadOptions(lang, textFilter = '') {
inputSearchEngineDisabled.classList = 'toggleSearchEngineDisabled';
inputSearchEngineDisabled.type = "radio";
inputSearchEngineDisabled.name = key + '-search-engine-action';
inputSearchEngineDisabled.title = 'Do nothing for ' + sites[i].origins_label;
inputSearchEngineDisabled.title = extensionAPI.i18n.getMessage('settingsDisableFor', [sites[i].origins_label]);
inputSearchEngineDisabled.lang = sites[i].language;
inputSearchEngineDisabled.setAttribute('data-wiki-key', key);
@ -117,7 +117,7 @@ async function loadOptions(lang, textFilter = '') {
inputSearchEngineReplace.classList = 'toggleSearchEngineReplace';
inputSearchEngineReplace.type = "radio";
inputSearchEngineReplace.name = key + '-search-engine-action';
inputSearchEngineReplace.title = 'Replace ' + sites[i].origins_label + ' search engine results with ' + sites[i].destination;
inputSearchEngineReplace.title = extensionAPI.i18n.getMessage('settingsReplaceFor', [sites[i].origins_label, sites[i].destination]);
inputSearchEngineReplace.lang = sites[i].language;
inputSearchEngineReplace.setAttribute('data-wiki-key', key);
@ -127,7 +127,7 @@ async function loadOptions(lang, textFilter = '') {
inputSearchEngineHide.classList = 'toggleSearchEngineHide';
inputSearchEngineHide.type = "radio";
inputSearchEngineHide.name = key + '-search-engine-action';
inputSearchEngineHide.title = 'Hide ' + sites[i].origins_label + ' from search engine results';
inputSearchEngineHide.title = extensionAPI.i18n.getMessage('settingsHideFor', [sites[i].origins_label]);
inputSearchEngineHide.lang = sites[i].language;
inputSearchEngineHide.setAttribute('data-wiki-key', key);
@ -231,42 +231,42 @@ async function loadOptions(lang, textFilter = '') {
// Output wiki disable radio button:
let inputDisabledText = document.createElement('span');
inputDisabledText.classList.add('visuallyHidden');
inputDisabledText.textContent = 'Disable action for ' + sites[i].origins_label;
inputDisabledText.textContent = extensionAPI.i18n.getMessage('settingsDisableFor', [sites[i].origins_label]);
labelDisabled.appendChild(inputDisabled);
labelDisabled.appendChild(inputDisabledText);
// Output wiki alert radio button:
let inputAlertText = document.createElement('span');
inputAlertText.classList.add('visuallyHidden');
inputAlertText.textContent = 'Show a banner on ' + sites[i].origins_label + ' linking to ' + sites[i].destination;
inputAlertText.textContent = extensionAPI.i18n.getMessage('settingsAlertFor', [sites[i].origins_label, sites[i].destination]);
labelAlert.appendChild(inputAlert);
labelAlert.appendChild(inputAlertText);
// Output wiki redirect radio button:
let inputRedirectText = document.createElement('span');
inputRedirectText.classList.add('visuallyHidden');
inputRedirectText.textContent = 'Automatically redirect ' + sites[i].origins_label + ' to ' + sites[i].destination;
inputRedirectText.textContent = extensionAPI.i18n.getMessage('settingsRedirectFor', [sites[i].origins_label, sites[i].destination]);
labelRedirect.appendChild(inputRedirect);
labelRedirect.appendChild(inputRedirectText);
// Output search engine disable radio button:
let inputSearchEngineDisabledText = document.createElement('span');
inputSearchEngineDisabledText.classList.add('visuallyHidden');
inputSearchEngineDisabledText.textContent = 'Do nothing for ' + sites[i].origins_label + ' on search engines';
inputSearchEngineDisabledText.textContent = extensionAPI.i18n.getMessage('settingsDisableFor', [sites[i].origins_label]);
labelSearchEngineDisabled.appendChild(inputSearchEngineDisabled);
labelSearchEngineDisabled.appendChild(inputSearchEngineDisabledText);
// Output search engine replace radio button:
let inputSearchEngineReplaceText = document.createElement('span');
inputSearchEngineReplaceText.classList.add('visuallyHidden');
inputSearchEngineReplaceText.textContent = 'Replace ' + sites[i].origins_label + ' search engine results with ' + sites[i].destination;
inputSearchEngineReplaceText.textContent = extensionAPI.i18n.getMessage('settingsReplaceFor', [sites[i].origins_label, sites[i].destination]);
labelSearchEngineReplace.appendChild(inputSearchEngineReplace);
labelSearchEngineReplace.appendChild(inputSearchEngineReplaceText);
// Output search engine hide radio button:
let inputSearchEngineHideText = document.createElement('span');
inputSearchEngineHideText.classList.add('visuallyHidden');
inputSearchEngineHideText.textContent = 'Hide ' + sites[i].origins_label + ' from search engines';
inputSearchEngineHideText.textContent = extensionAPI.i18n.getMessage('settingsHideFor', [sites[i].origins_label]);
labelSearchEngineHide.appendChild(inputSearchEngineHide);
labelSearchEngineHide.appendChild(inputSearchEngineHideText);
@ -294,7 +294,7 @@ async function loadOptions(lang, textFilter = '') {
wikiLink.target = '_blank';
wikiLink.appendChild(document.createTextNode(sites[i].destination));
wikiInfo.appendChild(wikiLink);
wikiInfo.appendChild(document.createTextNode(' (from ' + sites[i].origins_label + ')'));
wikiInfo.appendChild(document.createTextNode(extensionAPI.i18n.getMessage('settingsWikiFrom', [sites[i].origins_label])));
let siteContainer = document.createElement("div");
siteContainer.classList.add('site-container')
@ -393,7 +393,7 @@ function displayCustomSearchEngine(customSearchEngineHostname, customSearchEngin
let customSearchEngineDeleteButton = document.createElement('button');
customSearchEngineDeleteButton.classList.add('customSearchEngineDelete');
customSearchEngineDeleteButton.innerText = 'Delete';
customSearchEngineDeleteButton.innerText = extensionAPI.i18n.getMessage('settingsCustomWikiDelete');
customSearchEngineDeleteButton.addEventListener('click', () => {
listItem.remove();
@ -429,12 +429,13 @@ function setPower(setting, storeSetting = true) {
extensionAPI.storage.local.set({ 'power': setting });
}
const powerText = document.getElementById('powerText');
powerText.textContent = 'Extension is ' + setting;
const powerIcon = document.getElementById('powerIcon');
if (setting === 'on') {
powerText.textContent = extensionAPI.i18n.getMessage('settingsExtensionOn');
document.getElementById('powerCheckbox').checked = true;
powerIcon.innerText = '🔋';
} else {
powerText.textContent = extensionAPI.i18n.getMessage('settingsExtensionOff');
document.getElementById('powerCheckbox').checked = false;
powerIcon.innerText = '🪫';
}
@ -570,9 +571,9 @@ document.addEventListener('DOMContentLoaded', () => {
runAt: "document_idle"
}]);
extensionAPI.storage.sync.set({ 'breezewikiCustomHost': breezewikiCustomDomain });
document.getElementById('breezewikiCustomHostStatus').innerText = 'Successfully added';
document.getElementById('breezewikiCustomHostStatus').innerText = extensionAPI.i18n.getMessage('settingsBreezeWikiCustomHostSetSuccessful');
} else {
document.getElementById('breezewikiCustomHostStatus').innerText = 'Failed to set host';
document.getElementById('breezewikiCustomHostStatus').innerText = extensionAPI.i18n.getMessage('settingsBreezeWikiCustomHostSetFailed');
}
});
}
@ -640,7 +641,7 @@ document.addEventListener('DOMContentLoaded', () => {
}
///////////////////////////////////////////////////////////////
// Custom search engines are currently disabled
// Custom search engines are currently disabled
// due to content scripts being unregistered on-update.
///////////////////////////////////////////////////////////////
// document.getElementById('addCustomSearchEngine').addEventListener('click', () => {
@ -696,4 +697,4 @@ document.addEventListener('DOMContentLoaded', () => {
});
// Run v3 data migration:
migrateData();
migrateData();

View File

@ -78,7 +78,7 @@ function displayBreezewikiBanner(newUrl) {
let bannerWikiLink = document.createElement('a');
bannerWikiLink.classList.add('indie-wiki-banner-link');
bannerWikiLink.href = newUrl;
bannerWikiLink.textContent = 'View this Fandom wiki through BreezeWiki';
bannerWikiLink.textContent = extensionAPI.i18n.getMessage('bannerBreezeWiki');
bannerText.appendChild(bannerWikiLink);
banner.appendChild(bannerText);
@ -119,18 +119,18 @@ function displayRedirectBanner(newUrl, id, destinationName, destinationLanguage,
bannerRestoreLink.classList.add('indie-wiki-banner-link');
bannerRestoreLink.classList.add('indie-wiki-banner-link-small');
bannerRestoreLink.classList.add('indie-wiki-banner-hidden');
bannerRestoreLink.textContent = '⎌ Restore banner';
bannerRestoreLink.textContent = extensionAPI.i18n.getMessage('bannerRestore');
bannerControls.appendChild(bannerRestoreLink);
bannerRestoreLink.onclick = function (e) {
extensionAPI.storage.sync.get({ 'wikiSettings': {} }, async (response) => {
let wikiSettings = await commonFunctionDecompressJSON(response.wikiSettings);
wikiSettings[id] = 'alert';
extensionAPI.storage.sync.set({ 'wikiSettings': await commonFunctionCompressJSON(wikiSettings) });
e.target.textContent = '✓ Banner restored';
e.target.textContent = extensionAPI.i18n.getMessage('bannerRestoreDone');
e.target.classList.add('indie-wiki-banner-disabled');
bannerControls.querySelector('.indie-wiki-banner-redirect').textContent = '↪ Auto redirect this wiki';
bannerControls.querySelector('.indie-wiki-banner-redirect').textContent = extensionAPI.i18n.getMessage('bannerRedirect');
bannerControls.querySelector('.indie-wiki-banner-redirect').classList.remove('indie-wiki-banner-disabled');
bannerControls.querySelector('.indie-wiki-banner-disable').textContent = '✕ Disable banner for this wiki';
bannerControls.querySelector('.indie-wiki-banner-disable').textContent = extensionAPI.i18n.getMessage('bannerDisable');
bannerControls.querySelector('.indie-wiki-banner-disable').classList.remove('indie-wiki-banner-hidden');
bannerControls.querySelector('.indie-wiki-banner-disable').classList.remove('indie-wiki-banner-disabled');
});
@ -141,16 +141,16 @@ function displayRedirectBanner(newUrl, id, destinationName, destinationLanguage,
bannerDisableLink.classList.add('indie-wiki-banner-disable');
bannerDisableLink.classList.add('indie-wiki-banner-link');
bannerDisableLink.classList.add('indie-wiki-banner-link-small');
bannerDisableLink.textContent = '✕ Disable banner for this wiki';
bannerDisableLink.textContent = extensionAPI.i18n.getMessage('bannerDisable');
bannerControls.appendChild(bannerDisableLink);
bannerDisableLink.onclick = function (e) {
extensionAPI.storage.sync.get({ 'wikiSettings': {} }, async (response) => {
let wikiSettings = await commonFunctionDecompressJSON(response.wikiSettings);
wikiSettings[id] = 'disabled';
extensionAPI.storage.sync.set({ 'wikiSettings': await commonFunctionCompressJSON(wikiSettings) });
e.target.textContent = '✓ Banner disabled';
e.target.textContent = extensionAPI.i18n.getMessage('bannerDisableDone');
e.target.classList.add('indie-wiki-banner-disabled');
bannerControls.querySelector('.indie-wiki-banner-restore').textContent = '⎌ Restore banner';
bannerControls.querySelector('.indie-wiki-banner-restore').textContent = extensionAPI.i18n.getMessage('bannerRestore');
bannerControls.querySelector('.indie-wiki-banner-restore').classList.remove('indie-wiki-banner-hidden');
bannerControls.querySelector('.indie-wiki-banner-restore').classList.remove('indie-wiki-banner-disabled');
});
@ -161,17 +161,17 @@ function displayRedirectBanner(newUrl, id, destinationName, destinationLanguage,
bannerRedirectLink.classList.add('indie-wiki-banner-redirect');
bannerRedirectLink.classList.add('indie-wiki-banner-link');
bannerRedirectLink.classList.add('indie-wiki-banner-link-small');
bannerRedirectLink.textContent = '↪ Auto redirect this wiki';
bannerRedirectLink.textContent = extensionAPI.i18n.getMessage('bannerRedirect');
bannerControls.appendChild(bannerRedirectLink);
bannerRedirectLink.onclick = function (e) {
extensionAPI.storage.sync.get({ 'wikiSettings': {} }, async (response) => {
let wikiSettings = await commonFunctionDecompressJSON(response.wikiSettings);
wikiSettings[id] = 'redirect';
extensionAPI.storage.sync.set({ 'wikiSettings': await commonFunctionCompressJSON(wikiSettings) });
e.target.textContent = '✓ Redirect enabled';
e.target.textContent = extensionAPI.i18n.getMessage('bannerRedirectDone');
e.target.classList.add('indie-wiki-banner-disabled');
bannerControls.querySelector('.indie-wiki-banner-disable').classList.add('indie-wiki-banner-hidden');
bannerControls.querySelector('.indie-wiki-banner-restore').textContent = '⎌ Restore banner';
bannerControls.querySelector('.indie-wiki-banner-restore').textContent = extensionAPI.i18n.getMessage('bannerRestore');
bannerControls.querySelector('.indie-wiki-banner-restore').classList.remove('indie-wiki-banner-hidden');
bannerControls.querySelector('.indie-wiki-banner-restore').classList.remove('indie-wiki-banner-disabled');
});
@ -183,24 +183,29 @@ function displayRedirectBanner(newUrl, id, destinationName, destinationLanguage,
banner.appendChild(bannerText);
// Build descriptor
let descriptor = 'an independent';
let descriptor = extensionAPI.i18n.getMessage('bannerDescriptorIndependent');
if (tags.includes('wiki.gg')) {
descriptor = 'a wiki.gg';
descriptor = tags.includes('official')
? extensionAPI.i18n.getMessage('bannerDescriptorWikiggOfficial')
: extensionAPI.i18n.getMessage('bannerDescriptorWikigg')
}
if (tags.includes('official')) {
descriptor = 'an official ' + descriptor.split(" ").slice(-1);
if (tags.includes('official') && !tags.includes('wiki.gg')) {
descriptor = extensionAPI.i18n.getMessage('bannerDescriptorIndependentOfficial');
}
if (destinationLanguage === 'EN' && location.href.match(/fandom\.com\/[a-z]{2}\/wiki\//)) {
bannerText.textContent = 'There is ' + descriptor + ' wiki covering this topic in English!';
bannerText.textContent = extensionAPI.i18n.getMessage('bannerText', [
descriptor,
extensionAPI.i18n.getMessage('bannerLanguageEnglish')
]);
} else {
bannerText.textContent = 'There is ' + descriptor + ' wiki covering this topic!';
bannerText.textContent = extensionAPI.i18n.getMessage('bannerText', [descriptor]);
}
let bannerWikiLink = document.createElement('a');
bannerWikiLink.classList.add('indie-wiki-banner-link');
bannerText.appendChild(bannerWikiLink);
bannerWikiLink.href = newUrl;
bannerWikiLink.textContent = 'Visit ' + destinationName + ' →';
bannerWikiLink.textContent = extensionAPI.i18n.getMessage('bannerVisit', [destinationName]);
// Function to insert banner into DOM before body element
function addBannerToDOM() {

View File

@ -64,20 +64,20 @@ function replaceSearchResults(searchResultContainer, site, link) {
let indieResultText = document.createElement('span');
if (originArticle && decodeURIComponent(originArticle) !== site['origin_main_page']) {
let destinationArticleTitle = removeSubstringIfAtEnd(destinationArticle, site['destination_content_suffix']).replace(site['destination_content_prefix'], '').replaceAll('_', ' ');
// Decode article
destinationArticleTitle = decodeURIComponent(destinationArticleTitle);
if (site['language'] === 'EN' && link.match(/fandom\.com\/[a-z]{2}\/wiki\//)) {
indieResultText.innerText = 'Look up "' + destinationArticleTitle + '" on ' + site.destination + ' (EN)';
indieResultText.innerText = extensionAPI.i18n.getMessage('searchResultLookupEnglish', [destinationArticleTitle, site.destination]);
} else {
indieResultText.innerText = 'Look up "' + destinationArticleTitle + '" on ' + site.destination;
indieResultText.innerText = extensionAPI.i18n.getMessage('searchResultLookup', [destinationArticleTitle, site.destination]);
}
} else {
if (site['language'] === 'EN' && link.match(/fandom\.com\/[a-z]{2}\/wiki\//)) {
indieResultText.innerText = 'Visit ' + site.destination + ' (EN) instead';
indieResultText.innerText = extensionAPI.i18n.getMessage('searchResultVisitEnglish', [site.destination]);
} else {
indieResultText.innerText = 'Visit ' + site.destination + ' instead';
indieResultText.innerText = extensionAPI.i18n.getMessage('searchResultVisit', [site.destination]);
}
}
indieResultButton.append(indieResultFaviconContainer);
@ -89,7 +89,7 @@ function replaceSearchResults(searchResultContainer, site, link) {
resultControls.classList.add('iwb-result-controls');
// Output link to re-enable disabled result:
let enableResultButton = document.createElement('div');
enableResultButton.innerText = 'Re-enable the result below';
enableResultButton.innerText = extensionAPI.i18n.getMessage('searchResultReenable');
resultControls.prepend(enableResultButton);
enableResultButton.addEventListener('click', (e) => {
e.target.closest('.iwb-disavow').classList.remove('iwb-disavow');
@ -118,11 +118,10 @@ function hideSearchResults(searchResultContainer, searchEngine, site, showBanner
let searchRemovalNoticeLink = document.createElement('a');
searchRemovalNoticeLink.href = 'https://' + site.destination_base_url;
searchRemovalNoticeLink.textContent = site.destination;
searchRemovalNoticePretext = document.createTextNode('Indie Wiki Buddy has filtered out results from ' + site.origin + (site.language !== 'EN' ? ' (' + site.language + ')' : '') + '. Look for results from ');
searchRemovalNoticePosttext = document.createTextNode(' instead.');
searchRemovalNotice.appendChild(searchRemovalNoticePretext);
searchRemovalNotice.appendChild(searchRemovalNoticeLink);
searchRemovalNotice.appendChild(searchRemovalNoticePosttext);
searchRemovalNotice.appendChild(extensionAPI.i18n.getMessage('searchRemovalNotice', [
site.origin + site.language !== 'EN' ? ' (' + site.language + ')' : '',
searchRemovalNoticeLink.outerHTML
]));
// Output container for result controls:
let resultControls = document.createElement('div');
@ -131,18 +130,18 @@ function hideSearchResults(searchResultContainer, searchEngine, site, showBanner
// Output link to show hidden results:
let showResultsButton = document.createElement('div');
showResultsButton.setAttribute('data-group', 'iwb-search-result-' + elementId);
showResultsButton.innerText = 'Show filtered results';
showResultsButton.innerText = extensionAPI.i18n.getMessage('searchFilteredResultsShow');
resultControls.appendChild(showResultsButton)
showResultsButton.onclick = function (e) {
if (e.target.textContent.includes('Show')) {
e.target.textContent = 'Re-hide filtered results';
if (e.target.textContent.includes(extensionAPI.i18n.getMessage('searchFilteredResultsShow'))) {
e.target.textContent = extensionAPI.i18n.getMessage('searchFilteredResultsHide');
hiddenWikisRevealed[elementId] = true;
const selector = e.currentTarget.dataset.group;
document.querySelectorAll('.' + selector).forEach(el => {
el.classList.add('iwb-show');
})
} else {
e.target.textContent = 'Show filtered results';
e.target.textContent = extensionAPI.i18n.getMessage('searchFilteredResultsShow');
hiddenWikisRevealed[elementId] = false;
const selector = e.currentTarget.dataset.group;
document.querySelectorAll('.' + selector).forEach(el => {
@ -555,7 +554,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterGoogle(r);
});
break;
case 'duckduckgo':
// Function to filter search results in DuckDuckGo
function filterDuckDuckGo() {
@ -565,7 +564,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterDuckDuckGo();
break;
case 'bing':
// Function to filter search results in Bing
function filterBing() {
@ -595,7 +594,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterBing();
break;
case 'brave':
// Function to filter search results in Brave
function filterBrave() {
@ -605,7 +604,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterBrave();
break;
case 'ecosia':
// Function to filter search results in Ecosia
function filterEcosia() {
@ -615,7 +614,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterEcosia();
break;
case 'qwant':
// Function to filter search results in Qwant
function filterQwant() {
@ -625,7 +624,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterQwant();
break;
case 'startpage':
// Function to filter search results in Startpage
function filterStartpage() {
@ -635,7 +634,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterStartpage();
break;
case 'yandex':
// Function to filter search results in Yandex
function filterYandex() {
@ -645,7 +644,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterYandex();
break;
case 'yahoo':
// Function to filter search results in Yahoo
function filterYahoo() {
@ -678,7 +677,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterYahoo();
break;
case 'kagi':
// Function to filter search results in Kagi
function filterKagi() {
@ -688,7 +687,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
filterKagi();
break;
default:
if (storage.customSearchEngines) {
function filterSearXNG() {