Compare commits
7 Commits
2d46e8895e
...
cdd509de8c
Author | SHA1 | Date |
---|---|---|
Kevin Payravi | cdd509de8c | |
Kevin Payravi | f57a4e44a3 | |
DrWhoFan13 | 1142e62840 | |
DrWhoFan13 | 6792755dca | |
Kevin Payravi | 623eb2d149 | |
Jayden | 05f36d495d | |
DrWhoFan13 | 13be65bad8 |
|
@ -3798,13 +3798,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",
|
||||
|
@ -3907,6 +3913,12 @@
|
|||
"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",
|
||||
|
@ -4331,13 +4343,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",
|
||||
|
@ -4725,6 +4749,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",
|
||||
|
@ -5142,6 +5194,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",
|
||||
|
@ -7168,4 +7242,4 @@
|
|||
"miraheze"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
|
@ -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: 415 B |
Binary file not shown.
After Width: | Height: | Size: 577 B |
Binary file not shown.
After Width: | Height: | Size: 522 B |
|
@ -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);
|
||||
}
|
||||
|
@ -561,17 +561,17 @@ 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 {
|
||||
resultsToSort.push(searchResult);
|
||||
}
|
||||
resultsToSort.push(searchResult);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
@ -586,7 +586,7 @@ async function reorderSearchResults(searchResults, searchEngine, storage) {
|
|||
for (const searchResult of resultsToSort) {
|
||||
try {
|
||||
await reorderDestinationSearchResult(resultsFirstChild, searchResult);
|
||||
reorderedHrefs.push(searchResultLink);
|
||||
reorderedHrefs.push(searchResult.href);
|
||||
} catch (e) {
|
||||
console.log('Indie Wiki Buddy failed to properly re-order search results with error: ' + e);
|
||||
}
|
||||
|
@ -673,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, div[jsname]'));
|
||||
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]'));
|
||||
|
||||
return await reorderSearchResults(searchResults, 'google', storage);
|
||||
}
|
||||
|
@ -890,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