Searching via search path + capturing main pages
This includes updating all wiki data to include the origin and destination main page names, as well as destination search pathbreezewiki-header-control
parent
d07c7f3303
commit
7c64890ec1
15
README.md
15
README.md
|
@ -59,28 +59,33 @@ Entries are formatted as follows:
|
|||
{
|
||||
"origin": "Example Fandom Wiki",
|
||||
"origin_base_url": "example.fandom.com",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Example_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Example Wiki",
|
||||
"destination_base_url": "example.com",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "example.png"
|
||||
"destination_icon": "example.png",
|
||||
"destination_main_page": "Main_Page",
|
||||
"destination_search_path": "/index.php"
|
||||
}
|
||||
```
|
||||
|
||||
* `id`: A unique identifier for the wiki; should start with the two-letter language code for the wiki, followed by a hypen and the name of the subject/franchise the wiki covers.
|
||||
* `label`: A label that is shown to the user, identifying the non-indie wiki(s). This is usually just the name of the wiki, but in the case of multiple wikis, it may be something like "Example Fandom Wikis" (plural).
|
||||
* `origins`: An array of wikis being redirected to the independent wiki. The vast majority of the time, there is just one wiki here. There may be multiple when a series has multiple wikis that combined into one independent wiki; when a Fandom wiki has archived alternatives; or when there are multiple non-independent wikis across multiple wiki farms.
|
||||
* `origins`: An array of wikis being redirected to the destination wiki. The vast majority of the time, there is just one wiki here. There may be multiple when a series has multiple wikis that combined into one destination wiki; when a Fandom wiki has archived alternatives; or when there are multiple non-independent wikis across multiple wiki farms.
|
||||
* `origin`: Name of the wiki being redirected.
|
||||
* `origin_base_url`: Fully qualified domain name of the wiki being redirected.
|
||||
* `origin_content_path`: The URL path prefix for article links on the wiki being redirected. On MediaWiki wikis, it can be found at Special:Version. Fandom wikis are usually `/wiki/`.
|
||||
* `origin_main_page`: The title of the main page of the wiki. This is used to direct the user to the corresponding main page on the destination wiki.
|
||||
* `destination`: Name of the wiki being redirected to.
|
||||
* `destination_base_url`: Fully qualified domain name of the wiki being redirected to.
|
||||
* `destination_content_path`: The URL path prefix for article links on the wiki being redirected to. On MediaWiki wikis, it can be found at Special:Version. It is typically `/wiki/` or `/`.
|
||||
* `destination_content_prefix`: A prefix that is prepended to article names before performing a search on the destination wiki. This can be useful if a wiki separates its content into different namespaces. For example, if we wanted to redirect a wiki about Super Mario Odyssey to a general Mario wiki that has Odyssey content in a namespace called `Odyssey`, we would set `destination_content_prefix` to `Odyssey:`.
|
||||
* `destination_platform`: The wiki's software. The current supported options are `mediawiki` and `doku`. If you are contributing a wiki that is on another wiki platform, please open an issue so that support for the platform can be added.
|
||||
* `destination_icon`: The name of the wiki's favicon in the [favicons](favicons) folder.
|
||||
* `destination_main_page`: The title of the main page of the destination wiki.
|
||||
* `destination_search_path`: The URL path prefix for performing searches. On MediaWiki wikis, it is called the index.php entry point and can be found at Special:Version.
|
||||
|
||||
|
||||
Favicons should be uploaded as 16px PNGs inside the [favicons](favicons) folder.
|
||||
|
|
|
@ -193,11 +193,12 @@ function updateDeclarativeRule() {
|
|||
|
||||
function redirectToBreezeWiki(storage, tabId, url) {
|
||||
function processRedirect(host) {
|
||||
// Extract article from URL
|
||||
const urlFormatted = new URL(url);
|
||||
const subdomain = urlFormatted.hostname.split(".")[0];
|
||||
const article = url.split('fandom.com/wiki/')[1].replaceAll('%20', '_');
|
||||
|
||||
// Extract article from URL
|
||||
// Perform redirect
|
||||
if (article) {
|
||||
chrome.tabs.update(tabId, { url: host + '/' + subdomain + '/wiki/' + article });
|
||||
} else {
|
||||
|
@ -281,12 +282,14 @@ async function getData() {
|
|||
"origin": origin.origin,
|
||||
"origin_base_url": origin.origin_base_url,
|
||||
"origin_content_path": origin.origin_content_path,
|
||||
"origin_main_page": origin.origin_main_page,
|
||||
"destination": site.destination,
|
||||
"destination_base_url": site.destination_base_url,
|
||||
"destination_content_path": site.destination_content_path,
|
||||
"destination_search_path": site.destination_search_path,
|
||||
"destination_content_prefix": (site.destination_content_prefix ? site.destination_content_prefix : ""),
|
||||
"destination_platform": site.destination_platform,
|
||||
"destination_icon": site.destination_icon,
|
||||
"destination_main_page": site.destination_main_page,
|
||||
"lang": LANGS[i]
|
||||
})
|
||||
})
|
||||
|
@ -344,20 +347,25 @@ async function main(url, tabId) {
|
|||
// Get article name from the end of the URL;
|
||||
// We can't just take the last part of the path due to subpages;
|
||||
// Instead, we take everything after the wiki's base URL + content path
|
||||
let article = url.split(site['origin_base_url'] + site['origin_content_path'])[1];
|
||||
let article = decodeURIComponent(url.split(site['origin_base_url'] + site['origin_content_path'])[1]);
|
||||
// Set up URL to redirect user to based on wiki platform
|
||||
let newURL = '';
|
||||
if (article) {
|
||||
// Check if main page
|
||||
if (article === site['origin_main_page']) {
|
||||
article = site['destination_main_page'];
|
||||
}
|
||||
|
||||
let searchParams = '';
|
||||
switch (site['destination_platform']) {
|
||||
case 'mediawiki':
|
||||
searchParams = 'Special:Search/' + site['destination_content_prefix'] + article;
|
||||
searchParams = '?search=' + site['destination_content_prefix'] + article;
|
||||
break;
|
||||
case 'doku':
|
||||
searchParams = 'start?do=search&q=' + article;
|
||||
break;
|
||||
}
|
||||
newURL = 'https://' + site["destination_base_url"] + site["destination_content_path"] + searchParams;
|
||||
newURL = 'https://' + site["destination_base_url"] + site["destination_search_path"] + searchParams;
|
||||
} else {
|
||||
newURL = 'https://' + site["destination_base_url"];
|
||||
}
|
||||
|
|
|
@ -26,12 +26,14 @@ async function getData() {
|
|||
"origin": origin.origin,
|
||||
"origin_base_url": origin.origin_base_url,
|
||||
"origin_content_path": origin.origin_content_path,
|
||||
"origin_main_page": origin.origin_main_page,
|
||||
"destination": site.destination,
|
||||
"destination_base_url": site.destination_base_url,
|
||||
"destination_content_path": site.destination_content_path,
|
||||
"destination_search_path": site.destination_search_path,
|
||||
"destination_content_prefix": (site.destination_content_prefix ? site.destination_content_prefix : ""),
|
||||
"destination_platform": site.destination_platform,
|
||||
"destination_icon": site.destination_icon,
|
||||
"destination_main_page": site.destination_main_page,
|
||||
"lang": LANGS[i]
|
||||
})
|
||||
})
|
||||
|
@ -272,20 +274,25 @@ function main() {
|
|||
// Get article name from the end of the URL;
|
||||
// We can't just take the last part of the path due to subpages;
|
||||
// Instead, we take everything after the wiki's base URL + content path:
|
||||
let article = String(origin).split(site['origin_content_path'])[1];
|
||||
let article = decodeURIComponent(String(origin).split(site['origin_content_path'])[1]);
|
||||
// Set up URL to redirect user to based on wiki platform:
|
||||
let newURL = '';
|
||||
if (article) {
|
||||
// Check if main page
|
||||
if (article === site['origin_main_page']) {
|
||||
article = site['destination_main_page'];
|
||||
}
|
||||
|
||||
let searchParams = '';
|
||||
switch (site['destination_platform']) {
|
||||
case 'mediawiki':
|
||||
searchParams = 'Special:Search/' + site['destination_content_prefix'] + article;
|
||||
searchParams = '?search=' + site['destination_content_prefix'] + article;
|
||||
break;
|
||||
case 'doku':
|
||||
searchParams = 'start?do=search&q=' + article;
|
||||
break;
|
||||
}
|
||||
newURL = 'https://' + site["destination_base_url"] + site["destination_content_path"] + searchParams.replaceAll('+', '_');
|
||||
newURL = 'https://' + site["destination_base_url"] + site["destination_search_path"] + searchParams.replaceAll('+', '_');
|
||||
// We replace plus signs with underscores since Fextralife uses pluses instead of spaces/underscores
|
||||
} else {
|
||||
newURL = 'https://' + site["destination_base_url"];
|
||||
|
|
|
@ -41,12 +41,14 @@ async function getData() {
|
|||
"origin_group": site.origins_label,
|
||||
"origin_base_url": origin.origin_base_url,
|
||||
"origin_content_path": origin.origin_content_path,
|
||||
"origin_main_page": origin.origin_main_page,
|
||||
"destination": site.destination,
|
||||
"destination_base_url": site.destination_base_url,
|
||||
"destination_content_path": site.destination_content_path,
|
||||
"destination_search_path": site.destination_search_path,
|
||||
"destination_content_prefix": (site.destination_content_prefix ? site.destination_content_prefix : ""),
|
||||
"destination_platform": site.destination_platform,
|
||||
"destination_icon": site.destination_icon,
|
||||
"destination_main_page": site.destination_main_page,
|
||||
"lang": LANGS[i]
|
||||
})
|
||||
})
|
||||
|
@ -193,19 +195,24 @@ function escapeRegex(string) {
|
|||
|
||||
function replaceSearchResults(searchResultContainer, site, link) {
|
||||
// Build new URL:
|
||||
let article = link.split(site['origin_content_path'])[1]?.split('#')[0].split('?')[0].split('&')[0];
|
||||
let article = decodeURIComponent(link.split(site['origin_content_path'])[1]?.split('#')[0].split('?')[0].split('&')[0]);
|
||||
let newURL = '';
|
||||
if (article) {
|
||||
// Check if main page
|
||||
if (article === site['origin_main_page']) {
|
||||
article = site['destination_main_page'];
|
||||
}
|
||||
|
||||
let searchParams = '';
|
||||
switch (site['destination_platform']) {
|
||||
case 'mediawiki':
|
||||
searchParams = 'Special:Search/' + site['destination_content_prefix'] + article;
|
||||
searchParams = '?search=' + site['destination_content_prefix'] + article;
|
||||
break;
|
||||
case 'doku':
|
||||
searchParams = 'start?do=search&q=' + article;
|
||||
break;
|
||||
}
|
||||
newURL = 'https://' + site['destination_base_url'] + site['destination_content_path'] + searchParams;
|
||||
newURL = 'https://' + site['destination_base_url'] + site['destination_search_path'] + searchParams;
|
||||
} else {
|
||||
newURL = 'https://' + site['destination_base_url'];
|
||||
}
|
||||
|
@ -231,6 +238,11 @@ function replaceSearchResults(searchResultContainer, site, link) {
|
|||
indieResultFaviconContainer.append(indieResultFavicon);
|
||||
let indieResultText = document.createElement('span');
|
||||
if (article) {
|
||||
// Check if main page
|
||||
if (article === site['origin_main_page']) {
|
||||
article = site['destination_main_page'];
|
||||
}
|
||||
|
||||
if (site['lang'] === 'EN' && link.match(/fandom\.com\/[a-z]{2}\/wiki\//)) {
|
||||
indieResultText.innerText = 'Look up "' + decodeURIComponent(decodeURIComponent(article.replaceAll('_', ' '))) + '" on ' + site.destination + ' (EN)';
|
||||
} else {
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
{
|
||||
"origin": "Animal Crossing Fandom Wiki",
|
||||
"origin_base_url": "animalcrossing.fandom.com/de",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Animal_Crossing_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Animal Crossing Wiki",
|
||||
"destination_base_url": "animalcrossingwiki.de",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "doku",
|
||||
"destination_icon": "animalcrossingwiki.png"
|
||||
"destination_icon": "animalcrossingwiki.png",
|
||||
"destination_main_page": "start",
|
||||
"destination_search_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "de-detektivconan",
|
||||
|
@ -22,14 +24,16 @@
|
|||
{
|
||||
"origin": "Detektiv Conan Fandom Wiki",
|
||||
"origin_base_url": "detektivconan.fandom.com",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Detektiv_Conan_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "ConanWiki",
|
||||
"destination_base_url": "conanwiki.org",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "detektivconan.png"
|
||||
"destination_icon": "detektivconan.png",
|
||||
"destination_main_page": "Hauptseite",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "de-minecraft",
|
||||
|
@ -38,14 +42,16 @@
|
|||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/de",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "de.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "de-pokemon",
|
||||
|
@ -54,14 +60,16 @@
|
|||
{
|
||||
"origin": "Pokémon Fandom Wiki",
|
||||
"origin_base_url": "pokemon.fandom.com/de",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Pokémon_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "PokéWiki",
|
||||
"destination_base_url": "www.pokewiki.de",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "pokewiki.png"
|
||||
"destination_icon": "pokewiki.png",
|
||||
"destination_main_page": "Hauptseite",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "de-starcitizen",
|
||||
|
@ -70,13 +78,15 @@
|
|||
{
|
||||
"origin": "Star Citizen Fandom Wiki",
|
||||
"origin_base_url": "starcitizen.fandom.com/de",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Star_Citizen_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Star Citizen Wiki",
|
||||
"destination_base_url": "star-citizen.wiki",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "starcitizen.png"
|
||||
"destination_icon": "starcitizen.png",
|
||||
"destination_main_page": "Star_Citizen_Wiki",
|
||||
"destination_search_path": "/index.php"
|
||||
}
|
||||
]
|
1226
data/sitesEN.json
1226
data/sitesEN.json
File diff suppressed because it is too large
Load Diff
|
@ -6,14 +6,16 @@
|
|||
{
|
||||
"origin": "amiibopedia Fandom Wiki",
|
||||
"origin_base_url": "amiibo.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Amiibopedia"
|
||||
}
|
||||
],
|
||||
"destination": "amiibopedia",
|
||||
"destination_base_url": "es.amiibopedia.com",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "amiibopedia.png"
|
||||
"destination_icon": "amiibopedia.png",
|
||||
"destination_main_page": "Amiibopedia",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "es-animalcrossing",
|
||||
|
@ -22,14 +24,16 @@
|
|||
{
|
||||
"origin": "Animal Crossing Fandom Wiki",
|
||||
"origin_base_url": "animalcrossing.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Portada"
|
||||
}
|
||||
],
|
||||
"destination": "Animal Crossing Enciclopedia",
|
||||
"destination_base_url": "animalcrossing.wikidex.net",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "animalcrossing.png"
|
||||
"destination_icon": "animalcrossing.png",
|
||||
"destination_main_page": "Portada",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "es-minecraft",
|
||||
|
@ -38,14 +42,16 @@
|
|||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "es.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "es-supersmashbros",
|
||||
|
@ -54,14 +60,16 @@
|
|||
{
|
||||
"origin": "Smashpedia Fandom Wiki",
|
||||
"origin_base_url": "supersmashbros.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Smashpedia"
|
||||
}
|
||||
],
|
||||
"destination": "SmashPedia",
|
||||
"destination_base_url": "es.ssbwiki.com",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "smashpedia.png"
|
||||
"destination_icon": "smashpedia.png",
|
||||
"destination_main_page": "SmashPedia",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "es-touhou",
|
||||
|
@ -70,14 +78,16 @@
|
|||
{
|
||||
"origin": "Touhou Fandom Wiki",
|
||||
"origin_base_url": "touhou.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Página_principal"
|
||||
}
|
||||
],
|
||||
"destination": "Touhou Wiki",
|
||||
"destination_base_url": "es.touhouwiki.net",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "touhouwiki.png"
|
||||
"destination_icon": "touhouwiki.png",
|
||||
"destination_main_page": "Touhou_Wiki",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "es-pokemon",
|
||||
|
@ -86,13 +96,15 @@
|
|||
{
|
||||
"origin": "Pokémon Fandom Wiki",
|
||||
"origin_base_url": "pokemon.fandom.com/es",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Pokémon_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "WikiDex",
|
||||
"destination_base_url": "www.wikidex.net",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "wikidex.png"
|
||||
"destination_icon": "wikidex.png",
|
||||
"destination_main_page": "WikiDex",
|
||||
"destination_search_path": "/index.php"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -6,14 +6,16 @@
|
|||
{
|
||||
"origin": "Dragon Quest Fandom Wiki",
|
||||
"origin_base_url": "dragonquest.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Wiki_Dragon_Quest"
|
||||
}
|
||||
],
|
||||
"destination": "Wiki Dragon Quest",
|
||||
"destination_base_url": "wikidragonquest.fr",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "dragonquest.png"
|
||||
"destination_icon": "dragonquest.png",
|
||||
"destination_main_page": "Wiki_Dragon_Quest",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "fr-heroes",
|
||||
|
@ -22,14 +24,16 @@
|
|||
{
|
||||
"origin": "Heroes Fandom Wiki",
|
||||
"origin_base_url": "heroes.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Accueil_Heroes"
|
||||
}
|
||||
],
|
||||
"destination": "Heroes Wiki",
|
||||
"destination_base_url": "fr.heroeswiki.ddns.net",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "heroeswiki.png"
|
||||
"destination_icon": "heroeswiki.png",
|
||||
"destination_main_page": "Accueil",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "fr-fallout",
|
||||
|
@ -38,14 +42,16 @@
|
|||
{
|
||||
"origin": "L'Abri Fallout Fandom Wiki",
|
||||
"origin_base_url": "fallout.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Accueil"
|
||||
}
|
||||
],
|
||||
"destination": "Les Archives de Vault-Tec",
|
||||
"destination_base_url": "fallout-wiki.com",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "lesarchivesdevaulttec.png"
|
||||
"destination_icon": "lesarchivesdevaulttec.png",
|
||||
"destination_main_page": "Accueil",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "fr-minecraft",
|
||||
|
@ -54,19 +60,22 @@
|
|||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Minecraft Fandom Wiki (Archived)",
|
||||
"origin_base_url": "minecraft-archive.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Wiki_Minecraft"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "fr.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "fr-pokemon",
|
||||
|
@ -75,13 +84,15 @@
|
|||
{
|
||||
"origin": "Pokémon Fandom Wiki",
|
||||
"origin_base_url": "pokemon.fandom.com/fr",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Wiki_Pokémon"
|
||||
}
|
||||
],
|
||||
"destination": "Poképédia",
|
||||
"destination_base_url": "www.pokepedia.fr",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "pokepedia.png"
|
||||
"destination_icon": "pokepedia.png",
|
||||
"destination_main_page": "Portail:Accueil",
|
||||
"destination_search_path": "/index.php"
|
||||
}
|
||||
]
|
|
@ -6,14 +6,16 @@
|
|||
{
|
||||
"origin": "Analisi Pokémon Fandom Wiki",
|
||||
"origin_base_url": "pokemon.fandom.com/it",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Analisi_Pokémon_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Pokémon Central Wiki",
|
||||
"destination_base_url": "wiki.pokemoncentral.it",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "pokemoncentral.png"
|
||||
"destination_icon": "pokemoncentral.png",
|
||||
"destination_main_page": "Home",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "it-mario",
|
||||
|
@ -22,14 +24,16 @@
|
|||
{
|
||||
"origin": "Mario Fandom Wiki",
|
||||
"origin_base_url": "mario.fandom.com/it",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Mario_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Super Mario Wiki",
|
||||
"destination_base_url": "www.mariowiki.it",
|
||||
"destination_content_path": "/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "supermariowiki.png"
|
||||
"destination_icon": "supermariowiki.png",
|
||||
"destination_main_page": "Pagina_principale",
|
||||
"destination_search_path": "/index.php"
|
||||
},
|
||||
{
|
||||
"id": "it-earthbound",
|
||||
|
@ -38,13 +42,15 @@
|
|||
{
|
||||
"origin": "EarthBound Fandom Wiki",
|
||||
"origin_base_url": "earthbound.fandom.com/it",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "EarthBound_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "WikiBound",
|
||||
"destination_base_url": "it.wikibound.info",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "wikibound.png"
|
||||
"destination_icon": "wikibound.png",
|
||||
"destination_main_page": "Pagina_principale",
|
||||
"destination_search_path": "/w/index.php"
|
||||
}
|
||||
]
|
|
@ -6,13 +6,15 @@
|
|||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/ko",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
}
|
||||
],
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "ko.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
}
|
||||
]
|
|
@ -6,13 +6,15 @@
|
|||
{
|
||||
"origin": "Rayman Fandom Wiki",
|
||||
"origin_base_url": "rayman.fandom.com/pl",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Rayman_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "RayWiki",
|
||||
"destination_base_url": "raymanpc.com",
|
||||
"destination_content_path": "/wiki/pl/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "rayman.png"
|
||||
"destination_icon": "rayman.png",
|
||||
"destination_main_page": "Strona_główna",
|
||||
"destination_search_path": "/wiki/script-pl/index.php"
|
||||
}
|
||||
]
|
|
@ -6,14 +6,16 @@
|
|||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/pt",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "pt.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "pt-runescape",
|
||||
|
@ -22,13 +24,15 @@
|
|||
{
|
||||
"origin": "Runescape Fandom Wiki",
|
||||
"origin_base_url": "runescape.fandom.com/pt",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "RuneScape_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Runescape Wiki",
|
||||
"destination_base_url": "pt.runescape.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "runescape.png"
|
||||
"destination_icon": "runescape.png",
|
||||
"destination_main_page": "RuneScape_Wiki",
|
||||
"destination_search_path": "/"
|
||||
}
|
||||
]
|
|
@ -1,18 +1,20 @@
|
|||
[
|
||||
{
|
||||
{
|
||||
"id": "ru-minecraft",
|
||||
"origins_label": "Minecraft Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/ru",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Заглавная_страница"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "ru.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Заглавная_страница",
|
||||
"destination_search_path": "/"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -6,13 +6,15 @@
|
|||
{
|
||||
"origin": "Toki Pona Fandom Wiki",
|
||||
"origin_base_url": "tokipona.fandom.com",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "lipu_lawa"
|
||||
}
|
||||
],
|
||||
"destination": "Wikipesija",
|
||||
"destination_base_url": "wikipesija.org",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "wikipesija.png"
|
||||
"destination_icon": "wikipesija.png",
|
||||
"destination_main_page": "lipu_open",
|
||||
"destination_search_path": "/index.php"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -1,18 +1,20 @@
|
|||
[
|
||||
{
|
||||
{
|
||||
"id": "uk-minecraft",
|
||||
"origins_label": "Minecraft Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/uk",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Головна_сторінка"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "uk.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Головна_сторінка",
|
||||
"destination_search_path": "/"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -1,23 +1,26 @@
|
|||
[
|
||||
{
|
||||
{
|
||||
"id": "zh-minecraft",
|
||||
"origins_label": "Minecraft Fandom Wikis",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Minecraft Fandom Wiki",
|
||||
"origin_base_url": "minecraft.fandom.com/zh",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Minecraft Fandom Wiki (Archived)",
|
||||
"origin_base_url": "minecraft-archive.fandom.com/zh",
|
||||
"origin_content_path": "/wiki/"
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
"destination_base_url": "zh.minecraft.wiki",
|
||||
"destination_content_path": "/w/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "minecraftwiki.png"
|
||||
"destination_icon": "minecraftwiki.png",
|
||||
"destination_main_page": "Minecraft_Wiki",
|
||||
"destination_search_path": "/"
|
||||
}
|
||||
]
|
||||
]
|
|
@ -200,9 +200,6 @@ async function loadOptions(lang, textFilter = '') {
|
|||
// Populate individual wiki settings:
|
||||
const toggleContainer = document.getElementById('toggles');
|
||||
for (var i = 0; i < sites.length; i++) {
|
||||
console.log(sites[i].origins_label);
|
||||
console.log(sites[i].destination);
|
||||
console.log(textFilter);
|
||||
var key = sites[i].id;
|
||||
|
||||
// Create radio for disabling action on wiki:
|
||||
|
@ -401,7 +398,7 @@ async function loadOptions(lang, textFilter = '') {
|
|||
// Output wiki info:
|
||||
let wikiInfo = document.createElement('span');
|
||||
let iconLink = document.createElement("a");
|
||||
iconLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
|
||||
iconLink.href = 'https://' + sites[i].destination_base_url;
|
||||
iconLink.title = 'Visit ' + sites[i].destination;
|
||||
iconLink.target = '_blank';
|
||||
let icon = document.createElement("img");
|
||||
|
@ -416,7 +413,7 @@ async function loadOptions(lang, textFilter = '') {
|
|||
wikiInfo.appendChild(languageSpan);
|
||||
}
|
||||
let wikiLink = document.createElement("a");
|
||||
wikiLink.href = 'https://' + sites[i].destination_base_url + sites[i].destination_content_path;
|
||||
wikiLink.href = 'https://' + sites[i].destination_base_url;
|
||||
wikiLink.title = 'Visit ' + sites[i].destination;
|
||||
wikiLink.target = '_blank';
|
||||
wikiLink.appendChild(document.createTextNode(sites[i].destination));
|
||||
|
|
Loading…
Reference in New Issue