Commit Graph

28 Commits (c132fd096147585389ad9b325e103ea82a331f64)

Author SHA1 Message Date
DrWhoFan13 f3e73da8d1
Adding support for Swedish wikis + Swedish Wikisimpsons 2024-07-19 04:49:56 -05:00
SnorlaxMonster 6cb81fd193
Display all wikifarm hosts in the redirect banner (#737)
Instead of storing the destination wiki's host as a tag, move it to a dedicated "destination_host" property.
2024-07-18 04:32:58 -05:00
SnorlaxMonster 2b14da434b
Remove reliance on platform to construct URLs (#738)
Refactor code that depends on the destination wiki's platform in order
to support generic wiki platforms (e.g. Wikidot).

Redirection to the Main Page now uses the destination_content_path to
send users directly to the destination wiki's main page, rather than
using a different URL depending on the destination wiki's software.

The only remaining code that depends on the destination wiki's software
is the construction of the search path. This code now has a default case
that doesn't add any software-specific path to a constructed search URL.
This allows any wiki, regardless of the software it runs on, to be
added by putting its full search path in the "destination_search_path"
property of the redirect definition.

As a result of these changes, it is now possible to add redirects to
Wikidot wikis, by just defining the full search path in their redirect
entry's "destination_search_path".

Co-authored-by: SnorlaxMonster <snorlaxmonster@users.noreply.github.com>
2024-07-18 04:00:34 -05:00
Kevin Payravi 36b34ec55a Wrap article encoding in try-catch
We wrap in a try-catch as decoding can sometimes fail if destination article does have special characters (e.g. %) in the title.
2024-06-11 07:12:42 -04:00
Kevin Payravi b681c9b523 Decoding when checking for main page match 2024-06-07 00:43:54 -04:00
Kevin Payravi 5995b28efa Improvements to search engine link handling
* Handling when Google results use Google's middleman (google.com/url?q=)
* When handling middleman links, instead of replacing search result hrefs with updated links, we now add the updated link in a custom data-iwb-href attribute
* Better handling of special characters in page titles
2024-06-04 00:03:07 -04:00
Kevin Payravi 67b77a234c Improvements to Google search results re-ordering
* Instead of moving indie results to the top of Google search results, we now move indie results above the first non-indie (Fandom / Fextra / Neoseeker) result. If no non-indie result appears, re-ordering doesn't occur. This is to avoid moving less relevant results to the top, particularly for searches for generic terms.
* Improved Google filtering to account for when Google uses their own middleman link
2024-05-29 22:24:58 +02:00
Kevin Payravi 69fe308664 Fix for storage access from background 2024-04-27 23:43:14 -04:00
Kevin Payravi 3a75724520
Add search engine toggling / Search engine filtering fixes / Disabling SearNGX+Whoogle
More details at https://github.com/KevinPayravi/indie-wiki-buddy/pull/648
2024-04-23 00:18:42 -05:00
Jayden 39e44da293
Re-order indie wiki results in Google 2024-03-21 00:09:18 -05:00
Kevin Payravi cd7c4df9a7 Support for destination suffixes
A suffix that is added to the end of article names before performing a search on the destination wiki. This is typically used when a multilingual wiki separates its languages by suffixes (e.g. /es, /pt, etc.). Team Fortress Wiki is an example that uses this.
2024-03-13 03:01:41 -05:00
Kevin Payravi 59b6e17e69 Formatting files 2024-02-27 03:43:55 -06:00
Kevin Payravi b92772ec62 Changing BASE64REGEX from const to var
Since common-functions.js may be loaded multiple times on a page
2024-02-24 16:49:29 -05:00
Kevin Payravi 38235496dd Mentioning Neoseeker in docs and settings 2024-02-23 03:38:58 -05:00
Kevin Payravi 562ff0ff86 Adding new Minecraft wikis + favicon optimizations
Includes addition of LZH language category (literary / classical Chinese)
2024-02-19 18:34:37 -06:00
Kevin Payravi dff009d2ff Implementing search filtering on Yandex 2024-02-18 00:41:06 -06:00
Kevin Payravi 11d7a9b753 Adding non-EN wikis from wiki.gg
Includes wikis in DE, ES, FR, HU, IT, JA, KO, PL, PT, RU, TH, UK, and ZH. HU, JA, and TH are new language categories.
2024-02-12 01:23:47 -06:00
Kevin Payravi ac91d586b8 Compressing wiki settings
Browser sync storage has a 8kb limit per item, which we are quickly approaching. Compressing our wiki settings JSONs reduces storage from ~7.3kb to ~2.4kb.
2024-02-08 02:34:53 -06:00
SnorlaxMonster b86c7f620d
Adjust DokuWiki handing
Renamed platform "doku" to "dokuwiki".
The software is named "DokuWiki", just like "MediaWiki".

The previous search path construction for DokuWiki wikis would fail for
wikis that put their page names in query parameters instead of the path.
For example, https://wiki.diceydungeons.com/doku.php
(note that this wiki is not currently supported by IWB).
The solution is to use "doku.php", which always renders as the main page
 on DokuWikis, regardless of the URL structure, so can safely be used as
the base URL for searches.

However, to parallel MediaWiki wikis, which put "index.php" in the
wiki-specific search_path, I've moved "doku.php" to the definitions of
individual DokuWikis, so the JS now only adds query parameters.
2024-02-08 00:53:22 -06:00
Kevin Payravi 356363d4a0 Improve search filtering, esp. on Google and Bing
For Google, fixed issue with filtering on Google's country-TLDs, and improved selectors for identifying link results. This includes a function to identify the closest possible result container. For Bing, fixed an issue for when anchor tags don't have an href attribute.
2024-02-04 04:19:09 -06:00
Kevin Payravi b81c54fdc7 Adding title param to MediaWiki search + updating Miraheze search endpoint
The title param is needed on some MediaWiki sites
2024-02-03 20:20:23 -06:00
SnorlaxMonster 4e553949bb
Add wikis listed on Anti-Wikia Alliance's "Forked wikis" page 2024-02-01 23:04:21 -06:00
Kevin Payravi bae48ca1ac Set LANGS array to var as it may be declared multiple times 2024-01-29 01:21:10 -07:00
Kevin Payravi 8242e203e4 Fixes and improvements for Bing filtering
Resolves issue with Bing truncating links
2024-01-24 03:18:19 -07:00
Kevin Payravi 6b5c593f46 Rm unused constants 2024-01-11 03:01:15 -06:00
Kevin Payravi 9992d2ccf1 Query param handling fixes + other cleanup 2024-01-11 02:53:30 -06:00
Kevin Payravi 3919fbc913 Moving more common functions into shared file 2024-01-10 23:40:59 -06:00
Kevin Payravi 8f54b122e7 Moving pages and scripts into subfolders 2024-01-10 22:27:23 -06:00