Commit Graph

63 Commits (5a40af57274d54dde3cb759af0a15d77411a1c07)

Author SHA1 Message Date
Kevin Payravi 183f9a3a6d Additional fixes 2024-08-07 11:37:52 +02:00
Kevin Payravi 066305ae7a Handling null cases 2024-08-07 10:48:13 +02:00
Razboy20 94310c25f9
Add types to content scripts (#775) 2024-08-07 03:34:34 -05:00
Kevin Payravi c132fd0961 Adjust favicon display when replacing search results
Removing white background and adding drop-shadow; increasing favicon size from 12px to 16px
2024-07-27 05:57:50 -05:00
Kevin Payravi 84b78a29a2 Adjust Google re-order insertion position
Since we now take the parentNode of located Google search engine result containers, we need to adjust where we insert re-ordered results. Instead of prepending to parent node, we insert before the non-indie container.
2024-07-26 05:56:59 -05:00
Kevin Payravi 1c6efc0860 Filter .data-g elements from Google re-ordering 2024-07-24 04:25:19 -07:00
Kevin Payravi 2221d98dc9 Moving change observer to beginning of filtering
Adding the change observer after the initial filter occurs seems to be able to cause race conditions, particularly on Startpage. This commit moves the change observer addition to the beginning of the filtering function. The downside is that adding the change observer before filtering starts isn't ideal, since filtering manipulates the DOM and can trigger a re-check.
2024-07-23 17:02:19 -07:00
Kevin Payravi fb202486dc Apply parentNode to all Google search results
Need to apply to all for consistency between the three interactions (hiding / replacing / re-ordering)
2024-07-23 16:25:53 -07:00
Kevin Payravi b1a3110c70 Adjust logic for checking/applying iwb-detected
Change in logic required due to passing search result container parentNode when replacing Google search results
2024-07-23 03:13:09 -07:00
Kevin Payravi 1affa19c9c Using parent node for Google search results
When hiding or replacing Google search results, we now use the search result container's parentNode. This avoids some UI conflicts and issues, particularly when injecting the replacement button.

For Google search result re-ordering, we still use the original search container w/o the parent node.
2024-07-21 01:40:25 -07:00
Kevin Payravi 1b0fc20eaa Rv recent Google filter adjustments; not reliable
The .MjjYud class is sometimes applied on individual results, and other times for the div surrounding all results on a page.
2024-07-20 03:17:40 -07:00
Kevin Payravi fda94b8be5 Improvements to Google selectors 2024-07-20 02:57:42 -07:00
Kevin Payravi a993538e8b Detect Google container class for search filtering
Adding a check for div.MjjYud when injecting redirect button into Google search results. This helps resolve UI issues with non-traditional search results (like video results).
2024-07-19 01:24:28 -07:00
Kevin Payravi e1096825c5 Fix for outputting search removal notice banner
Broke during the i18n migration
2024-07-19 01:23:01 -07:00
Kevin Payravi e34b1ce5d5 Google re-ordering fix for edge case
Google will insert the user's searches into some of their meta links. If the user does a Google search for a non-indie domain (e.g. mario.fandom.com), that domain can appear in those Google meta links and cause IWB to detect them. By filtering out links that start with /search, we avoid capturing these.
2024-07-18 04:07:14 -07:00
Dianliang233 4d9243aab7
Allow i18n for the extension (#716) 2024-06-29 05:20:53 -05:00
SnorlaxMonster 029dd60a0d
Put search engine CSS in stylesheet
Instead of injecting CSS rules into the original page's stylesheet,
store the IWB styles in a CSS file and add that file to the manifest
scripts.
2024-06-11 00:27:56 -05:00
SnorlaxMonster 4f6d09d832
Share filtering code between search engines
Ensure all search engines use the same code to filter which search results are results for supported non-indie wikifarms. This also fixes an apparent oversight where Qwant was not redirecting Neoseeker search results.
2024-06-08 13:52:50 -05:00
Kevin Payravi b681c9b523 Decoding when checking for main page match 2024-06-07 00:43:54 -04:00
Kevin Payravi dee2c5d1a8 Update Qwant CSS selector
Previous selector no longer works
2024-06-05 22:38:23 -05: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 713278d791 Updating reorder hiding regex
Adding "end of line" to regex, to prevent matching partial results and hiding results we don't want to hide
2024-05-19 02:15:37 +02:00
Kevin Payravi 096a870719 Additional selectors for reorder-ignore
"div[data-docid], div[data-lpage]" captures image results
2024-05-03 16:20:52 +03:00
Kevin Payravi 623eb2d149 Adjust query for non-standard search results / Fix
For identifying non-standard search results, "div[jsname]" is unreliable as Google does seem to add it to some standard search results. Replacing with checks for attributes that are more specific to Q&A dropdowns + cards.
2024-05-03 02:38:39 +03:00
Jayden 05f36d495d
re-ordering: unconditionally check for first result = indie wiki
This check should be moved outside of the searchEngineSettings if statement, because the result of it should be applied regardless of the searchEngineSettings.
2024-05-02 16:56:12 -05:00
Kevin Payravi cf838788b2 Splitting reordering into separate loop
We now have on loop that checks which results we want to re-order, and then a second loop that actually does the re-ordering.
2024-05-01 18:59:28 -05:00
Kevin Payravi a8c740480c Removing reverse for now, needs a closer look 2024-05-01 14:55:41 -05:00
Kevin Payravi 1f5f969750 For search re-ordering, avoid capturing Q&A
Check for JS-powered sections via div[jsname]

Co-Authored-By: Jayden <7265189+jayktaylor@users.noreply.github.com>
2024-05-01 14:50:52 -05:00
Kevin Payravi f55cd3b795 For search re-ordering, reverse at end
This avoids conflicting with the check for the first result being an indie wiki
2024-05-01 14:49:05 -05:00
Kevin Payravi 84892bf478 Reverse search results when re-ordering
Ensuring higher results are re-ordered to the top last
2024-04-27 20:22:28 -04:00
Kevin Payravi d7fcc1d172 Only run re-ordering when wiki not disabled 2024-04-27 20:07:30 -04:00
Kevin Payravi 535c6d28b7 Expand selector for re-ordering
Needed for Google when viewing on iPhone
2024-04-25 00:34:45 -05: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 520130e3c8
re-ordering: skip non-standard search results 2024-04-14 03:45:13 -05:00
Kevin Payravi 1c4ae5ff8f
More reliable element detection for search result re-ordering 2024-03-22 03:23:50 -05:00
Jayden 39e44da293
Re-order indie wiki results in Google 2024-03-21 00:09:18 -05:00
James McKee 052bb27887
Support custom search engine URLS, currently SearXNG and Whoogle 2024-03-18 03:03:37 -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 a66f3c91a8 Removing Object.prototype functions
Improve compatibility across browsers + not a best practice
2024-02-27 02:55:41 -06:00
Autumn McKee cee24440b7 Also filter URLs in "Quick Peek" section 2024-02-22 02:32:03 -06:00
Autumn McKee 4ca39ec1c3 Search filtering for Kagi 2024-02-22 02:32:03 -06:00
Kevin Payravi 4110506c8a Removing console log 2024-02-18 01:59:38 -06:00
Kevin Payravi 851b7167ac Accounting for tracking links for Yahoo filtering
Yahoo search results sometimes have tracking URLs (r.search.yahoo.com/). This commit extracts the embedded original URL as needed.
2024-02-18 01:57:59 -06:00
Kevin Payravi d309be7410 Also filtering image result links in Yandex 2024-02-18 01:06:03 -06:00
Kevin Payravi 47b42b8af5 Adding support for alternative Yandex domains 2024-02-18 00:59:11 -06:00
Kevin Payravi dff009d2ff Implementing search filtering on Yandex 2024-02-18 00:41:06 -06:00
Kevin Payravi 27f66f17c0 Adding checks 2024-02-17 14:32:12 -06:00
Kevin Payravi 46f3b88a9d
Qwant search filtering support
Co-authored-by: Snootiful <denniskok@fastmail.com>
2024-02-17 02:16:30 -06:00