Compare commits
18 Commits
633b068820
...
53983aaed5
Author | SHA1 | Date |
---|---|---|
Tomo | 53983aaed5 | |
Kevin Payravi | ac2db4e352 | |
Kevin Payravi | 096a870719 | |
Kevin Payravi | 411763ca14 | |
Kevin Payravi | cdd509de8c | |
Kevin Payravi | f57a4e44a3 | |
DrWhoFan13 | 1142e62840 | |
DrWhoFan13 | 6792755dca | |
Kevin Payravi | 623eb2d149 | |
Jayden | 05f36d495d | |
DrWhoFan13 | 13be65bad8 | |
DrWhoFan13 | 2d46e8895e | |
Kevin Payravi | 5a1ac577db | |
Kevin Payravi | cf838788b2 | |
Kevin Payravi | a8c740480c | |
Kevin Payravi | 1f5f969750 | |
Kevin Payravi | f55cd3b795 | |
Tomo | 80a774db82 |
|
@ -240,6 +240,22 @@
|
|||
"miraheze"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "en-animania",
|
||||
"origins_label": "Animania Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Animania Fandom Wiki",
|
||||
"origin_base_url": "animania.fandom.com",
|
||||
"origin_content_path": "/wiki/"
|
||||
}
|
||||
],
|
||||
"destination": "Animania Wiki",
|
||||
"destination_base_url": "animaniamod.net",
|
||||
"destination_content_path": "/index.php/",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "animania.png"
|
||||
},
|
||||
{
|
||||
"id": "en-anothereden",
|
||||
"origins_label": "Another Eden Fandom Wiki",
|
||||
|
@ -1605,6 +1621,25 @@
|
|||
"destination_search_path": "/wiki/index.php",
|
||||
"destination_content_path": "/wiki/"
|
||||
},
|
||||
{
|
||||
"id": "en-dfo",
|
||||
"origins_label": "Dungeon Fighter Online Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Dungeon Fighter Online Fandom Wiki",
|
||||
"origin_base_url": "dfo.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Dungeon_Fighter_Online_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "DFO World Wiki",
|
||||
"destination_base_url": "wiki.dfo.world",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "dfoworldwiki.png",
|
||||
"destination_content_path": "/view/",
|
||||
"destination_search_path": "/index.php",
|
||||
"destination_main_page": "Main_Page"
|
||||
},
|
||||
{
|
||||
"id": "en-digimon",
|
||||
"origins_label": "Digimon Fandom & Neoseeker Wikis",
|
||||
|
@ -3798,13 +3833,19 @@
|
|||
},
|
||||
{
|
||||
"id": "en-micronations",
|
||||
"origins_label": "MicroNations Fandom Wiki",
|
||||
"origins_label": "MicroNations Fandom Wikis",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "MicroNations Fandom Wiki",
|
||||
"origin_base_url": "micronations.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Main_Page"
|
||||
},
|
||||
{
|
||||
"origin": "Micronations Fandom Wiki",
|
||||
"origin_base_url": "microcountries.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Micronations_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "MicroWiki",
|
||||
|
@ -3901,6 +3942,18 @@
|
|||
"origin_base_url": "minecraftdungeons.wiki.fextralife.com",
|
||||
"origin_content_path": "/",
|
||||
"origin_main_page": "Minecraft+Dungeons+Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Minecraft Story Mode Fandom Wiki",
|
||||
"origin_base_url": "minecraftstorymode.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft_Story_Mode_Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Minecraft Dungeons Fandom Wiki",
|
||||
"origin_base_url": "minecraftdungeons-archive.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Minecraft:_Dungeons_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Minecraft Wiki",
|
||||
|
@ -4325,13 +4378,25 @@
|
|||
},
|
||||
{
|
||||
"id": "en-pathfinder",
|
||||
"origins_label": "Pathfinder Fandom Wiki",
|
||||
"origins_label": "Pathfinder Fandom & Fextra Wikis",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Pathfinder Fandom Wiki",
|
||||
"origin_base_url": "pathfinder.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Pathfinder_Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Pathfinder Kingmaker Fextralife Wiki",
|
||||
"origin_base_url": "pathfinderkingmaker.wiki.fextralife.com",
|
||||
"origin_content_path": "/",
|
||||
"origin_main_page": "Pathfinder:+Kingmaker+Wiki"
|
||||
},
|
||||
{
|
||||
"origin": "Pathfinder Wrath of the Righteous Fextralife Wiki",
|
||||
"origin_base_url": "pathfinderwrathoftherighteous.wiki.fextralife.com",
|
||||
"origin_content_path": "/",
|
||||
"origin_main_page": "Pathfinder:+Wrath+of+the+Righteous+Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "PathfinderWiki",
|
||||
|
@ -4719,6 +4784,34 @@
|
|||
"destination_search_path": "/mediawiki/index.php",
|
||||
"destination_content_path": "/wiki/"
|
||||
},
|
||||
{
|
||||
"id": "en-raincomic",
|
||||
"origins_label": "Rain (web comic) Fandom Wikis",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Rain (web comic) Fandom Wiki",
|
||||
"origin_base_url": "rain-web-comic.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Rain_(web_comic)_Wikia"
|
||||
},
|
||||
{
|
||||
"origin": "My Impossible Soulmate Fandom Wiki",
|
||||
"origin_base_url": "myimpossiblesoulmate.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "My_Impossible_Soulmate_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "Rainverse Wiki",
|
||||
"destination_base_url": "rainverse.wiki",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "rainversewiki.png",
|
||||
"destination_content_path": "/wiki/",
|
||||
"destination_search_path": "/w/index.php",
|
||||
"destination_main_page": "Rainverse_Wiki",
|
||||
"tags": [
|
||||
"miraheze"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "en-rainworld",
|
||||
"origins_label": "Rain World Fandom Wikis",
|
||||
|
@ -5136,6 +5229,28 @@
|
|||
"official"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "en-scpsl",
|
||||
"origins_label": "SCP: Secret Laboratory Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "SCP: Secret Laboratory Fandom Wiki",
|
||||
"origin_base_url": "scp-secret-laboratory-official.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "SCP:_Secret_Laboratory_Official_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "SCP: Secret Laboratory Wiki",
|
||||
"destination_base_url": "en.scpslgame.com",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "scpslwiki.png",
|
||||
"destination_main_page": "Main_Page",
|
||||
"destination_search_path": "/index.php",
|
||||
"destination_content_path": "/index.php?title=",
|
||||
"tags": [
|
||||
"official"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "en-seaofthieves",
|
||||
"origins_label": "Sea of Thieves Fandom Wiki",
|
||||
|
@ -6964,6 +7079,25 @@
|
|||
"destination_search_path": "/index.php",
|
||||
"destination_content_path": "/w/"
|
||||
},
|
||||
{
|
||||
"id": "en-xkcd",
|
||||
"origins_label": "xkcd Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "xkcd Fandom Wiki",
|
||||
"origin_base_url": "xkcd.fandom.com",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Xkcd_Wiki"
|
||||
}
|
||||
],
|
||||
"destination": "explain xkcd",
|
||||
"destination_base_url": "www.explainxkcd.com",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "explainxkcd.png",
|
||||
"destination_main_page": "Main_Page",
|
||||
"destination_search_path": "/wiki/index.php",
|
||||
"destination_content_path": "/wiki/index.php/"
|
||||
},
|
||||
{
|
||||
"id": "en-yugioh",
|
||||
"origins_label": "Yu-Gi-Oh! Fandom & Neoseeker Wikis",
|
||||
|
|
|
@ -78,5 +78,24 @@
|
|||
"destination_main_page": "Home",
|
||||
"destination_search_path": "/index.php",
|
||||
"destination_content_path": "/"
|
||||
},
|
||||
{
|
||||
"id": "it-startrek",
|
||||
"origins_label": "Memory Alpha Fandom Wiki",
|
||||
"origins": [
|
||||
{
|
||||
"origin": "Memory Alpha Fandom Wiki",
|
||||
"origin_base_url": "memory-alpha.fandom.com/it",
|
||||
"origin_content_path": "/wiki/",
|
||||
"origin_main_page": "Pagina_principale"
|
||||
}
|
||||
],
|
||||
"destination": "WikiTrek",
|
||||
"destination_base_url": "wikitrek.org",
|
||||
"destination_platform": "mediawiki",
|
||||
"destination_icon": "wikitrek.png",
|
||||
"destination_main_page": "Pagina_principale",
|
||||
"destination_search_path": "/wt/index.php",
|
||||
"destination_content_path": "/wiki/"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
After Width: | Height: | Size: 515 B |
Binary file not shown.
After Width: | Height: | Size: 251 B |
Binary file not shown.
After Width: | Height: | Size: 415 B |
Binary file not shown.
After Width: | Height: | Size: 577 B |
Binary file not shown.
After Width: | Height: | Size: 522 B |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Indie Wiki Buddy",
|
||||
"version": "3.7.0",
|
||||
"version": "3.7.1",
|
||||
"description": "Indie Wiki Buddy helps you discover quality, independent wikis through alerts, redirects, and search filtering.",
|
||||
"permissions": [
|
||||
"storage",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Indie Wiki Buddy",
|
||||
"version": "3.7.0",
|
||||
"version": "3.7.1",
|
||||
"description": "Indie Wiki Buddy helps you discover quality, independent wikis through alerts, redirects, and search filtering.",
|
||||
"permissions": [
|
||||
"storage",
|
||||
|
|
|
@ -19,7 +19,7 @@ function addDOMChangeObserver(callback, searchEngine, storage) {
|
|||
const wrappedCallback = (mutations, observer) => {
|
||||
callback(searchEngine, storage, mutations, observer);
|
||||
};
|
||||
|
||||
|
||||
const domObserver = new MutationObserver(wrappedCallback);
|
||||
domObserver.observe(document.body, config);
|
||||
}
|
||||
|
@ -548,11 +548,8 @@ async function reorderSearchResults(searchResults, searchEngine, storage) {
|
|||
if (!resultsFirstChild) return;
|
||||
|
||||
let crossLanguageSetting = storage.crossLanguage || 'off';
|
||||
let resultsToSort = [];
|
||||
|
||||
// Re-order search results
|
||||
// This is so that higher results are re-ordered to the top last
|
||||
searchResults = searchResults.reverse();
|
||||
|
||||
for (const searchResult of searchResults) {
|
||||
try {
|
||||
if (searchResult.closest('.iwb-detected')) {
|
||||
|
@ -564,24 +561,36 @@ async function reorderSearchResults(searchResults, searchEngine, storage) {
|
|||
// Handle re-ordering of results to move destination results up the page
|
||||
let matchingDest = await commonFunctionFindMatchingSite(searchResultLink, crossLanguageSetting, true);
|
||||
if (matchingDest) {
|
||||
if (resultsFirstChild.contains(searchResult)) {
|
||||
// If this search result is inside the first child of the results container (aka, it's the first result),
|
||||
// and there is a matchingDest at this point, then an indie wiki is #1 on the search results page.
|
||||
// Therefore, we should abandon the search re-ordering.
|
||||
console.debug('Indie Wiki Buddy is not re-ordering results, as an indie wiki is already the first result.');
|
||||
break;
|
||||
}
|
||||
|
||||
let searchEngineSettings = await commonFunctionDecompressJSON(storage.searchEngineSettings || {});
|
||||
if (searchEngineSettings[matchingDest.id] !== 'disabled') {
|
||||
if (resultsFirstChild.contains(searchResult)) {
|
||||
// If this search result is inside the first child of the results container (aka, it's the first result),
|
||||
// and there is a matchingDest at this point, then an indie wiki is #1 on the search results page.
|
||||
// Therefore, we should abandon the search re-ordering.
|
||||
console.debug('Indie Wiki Buddy is not re-ordering results, as an indie wiki is already the first result.');
|
||||
break;
|
||||
} else {
|
||||
await reorderDestinationSearchResult(resultsFirstChild, searchResult);
|
||||
reorderedHrefs.push(searchResultLink);
|
||||
}
|
||||
resultsToSort.push(searchResult);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Indie Wiki Buddy failed to properly re-order search results with error: ' + e);
|
||||
}
|
||||
}
|
||||
|
||||
// Reverse order of resultsToSort,
|
||||
// to restore top-down order.
|
||||
resultsToSort = resultsToSort.reverse();
|
||||
|
||||
for (const searchResult of resultsToSort) {
|
||||
try {
|
||||
await reorderDestinationSearchResult(resultsFirstChild, searchResult);
|
||||
reorderedHrefs.push(searchResult.href);
|
||||
} catch (e) {
|
||||
console.log('Indie Wiki Buddy failed to properly re-order search results with error: ' + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return reorderedHrefs;
|
||||
|
@ -664,7 +673,7 @@ function startFiltering(searchEngine, storage, mutations = null, observer = null
|
|||
let searchResults = document.querySelectorAll("div[data-hveid] a:first-of-type:not([role='button']):not([target='_self'])");
|
||||
|
||||
// Remove any matches that are not "standard" search results - this could've been done with :has() but limited browser support right now
|
||||
searchResults = Array.from(searchResults).filter((e) => !e.closest('g-section-with-header'));
|
||||
searchResults = Array.from(searchResults).filter((e) => !e.closest('g-section-with-header, div[aria-expanded], div[data-q], div[data-minw], div[data-num-cols], div[data-docid], div[data-lpage]'));
|
||||
|
||||
return await reorderSearchResults(searchResults, 'google', storage);
|
||||
}
|
||||
|
@ -881,4 +890,4 @@ if (currentURL.hostname.includes('www.google.')) {
|
|||
checkIfEnabled('yahoo');
|
||||
} else if (currentURL.hostname.includes('kagi.com')) {
|
||||
checkIfEnabled('kagi');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue