Fivefold / linkding-injector

Injects search results from the linkding bookmark service into search pages like google and duckduckgo
MIT License
194 stars 7 forks source link

Several URL parameters in GET query break search parameter detection #18

Closed adamshand closed 1 year ago

adamshand commented 1 year ago

The injector works fine with Google, but no longer works with DuckDuckGo. :-(

Running latest Linkding and extension version 1.3.1

And continued gratitude for this extension, I love it and tell everyone about how great it is.

adamshand commented 1 year ago

Actually it's a bit weirder than that. It's partially working.

If you got to: https://duckduckgo.com/ and search, the injector doesn't work.

But once you are on the results page, if you search again, it works as expected.

Fivefold commented 1 year ago

Hey @adamshand, happy to hear you are still using the extension.

I recently was made aware that DDG support was broken in 1.3.0 (in #15 and #16) and it should be fixed with 1.3.1 (which went online two days ago. Is this when your problems started?)

Unfortunately I can't reproduce your behaviour.

If you got to: https://duckduckgo.com/ and search, the injector doesn't work.

This works for me, so I will have to ask you to help me troubleshoot this a bit.

Try this:

  1. In your browser, go to https://duckduckgo.com/
  2. Open the Web Developer Tools by pressing F12 and go to the 'Console' Tab.
  3. Search for a term that actually delivers results on your linkding instance
  4. Look for any errors (shown in red) in the console by searchInjection.js (look to the right side)
  5. If you find one, right-click on the error, choose 'Copy message' and paste it here

An error would look like this (but can be any text):

21:48:24.010 TypeError: d is null searchInjection.js:182:15
adamshand commented 1 year ago

Apologies, after some more experimenting it appears that this is caused by the Chrome extension Adguard.

Bit of a weird one, but disabling Adguard definitely fixes the problem, so I'll close this ticket.

Thanks for your help. :-)

Fivefold commented 1 year ago

Glad to hear you found a fix so quickly!

Since Adguard is a popular extension I would appreciate if you could post here if you find a solution to how to use the injector extension together with Adguard just in case someone else has this problem.

adamshand commented 1 year ago

Will figure it out and post here when I figure it out.

Can you assign the ticket to me so I remember?

adamshand commented 1 year ago

Okay on further investigation it doesn't appear that Adguard is the problem.

If you go to duckduckgo.com using Brave and search, DDG adds hps=1 to the URL and injector seems unable to show search results.

Hopefully the below URL doesn't work for you?

https://duckduckgo.com/?hps=1&q=dogs&ia=web

If you remove the "hps=1" from the URL, injector to works as expected.

The error message in browser console is:

linkding injector: no message and no search results
(anonymous) @ searchInjection.js:1
Fivefold commented 1 year ago

Thank you @adamshand for troubleshooting this further, I now know what the issue was. It should be fixed now in the new v1.3.2 (you can check it out immediately with Firefox, Chrome-based browsers will update a bit later).

In case it's not fixed, do reopen though of course!

GulyFMG commented 7 months ago

@Fivefold Sorry to necro this issue but i noticed that in version 1.3.4 with duckduckgo the injector is not working.

imagem

linkding injector: no message and no search results searchInjection.js:150:12 <anónimo> searchInjection.js:150

I did try with google and it works as expected.

adamshand commented 7 months ago

I just tested and 1.3.4 seems to be working fine for me on DDG?

image
Fivefold commented 7 months ago

@GulyFMG I don't mind the necro, but if duckduckgo support actually broke it should be tracked in a separate issue. Please continue the discussion in #25