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>
* 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
* 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
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.
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.
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.
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.