hoogle icon indicating copy to clipboard operation
hoogle copied to clipboard

The "search plugin" link at hoogle.haskell.org (Hoogle 5) is broken

Open ntc2 opened this issue 8 years ago • 8 comments

It points to http://hoogle.haskell.org///cdn.rawgit.com/ndmitchell/hoogle/d451df5826229a6ddc3ff0a7d28a3740c8866f86/html/search.xml. Perhaps it should point to http://cdn.rawgit.com/ndmitchell/hoogle/d451df5826229a6ddc3ff0a7d28a3740c8866f86/html/search.xml instead?

ntc2 avatar Mar 16 '17 20:03 ntc2

The problem is https://github.com/ndmitchell/hoogle/blob/master/html/hoogle.js#L251 trys to make the URL absolute in a way that messes up now some things are behind a cdn. Which browser are you using? I can't get it working through Chrome regardless of what I do it doesn't work, which may be because Chrome planned to remove it and other people have failed to use it. Given that, my inclination is just to remove it, given it doesn't work anyway.

ndmitchell avatar Mar 26 '17 21:03 ndmitchell

Seems Edge has also removed it, so I guess this feature was being abused widely and I should just delete it. Leaving it as a <link> should be sufficient.

ndmitchell avatar Mar 26 '17 21:03 ndmitchell

I'm using Firefox 52 on GNU/Linux.

On Sun, Mar 26, 2017 at 2:32 PM, Neil Mitchell [email protected] wrote:

The problem is https://github.com/ndmitchell/hoogle/blob/master/html/ hoogle.js#L251 trys to make the URL absolute in a way that messes up now some things are behind a cdn. Which browser are you using? I can't get it working through Chrome regardless of what I do it doesn't work, which may be because Chrome planned to remove it https://groups.google.com/a/chromium.org/forum/#!topic/Blink-dev/FXZloLz3Bao and other people have failed to use it http://stackoverflow.com/questions/41281475/chrome-does-not-support-adding-searchengine-through-javascript-window-external. Given that, my inclination is just to remove it, given it doesn't work anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ndmitchell/hoogle/issues/205#issuecomment-289318017, or mute the thread https://github.com/notifications/unsubscribe-auth/AABAJY9C39JdwMoza98CjZkFGqfsEJt5ks5rptlVgaJpZM4Mf2gM .

ntc2 avatar Mar 26 '17 22:03 ntc2

It seems to be a feature still present on Firefox. But if that's the only place, it's hard to justify keeping it.

ndmitchell avatar Mar 27 '17 06:03 ndmitchell

Not maintaining the search engine plugin yourself sounds reasonable to me. There are at least two good alternatives.

For people that want a search engine plugin, the site mycroftproject.com lets one create a search plugin any site very easily, and saves your plugin for future use by other users. It already had a Hoogle 4 plugin and I just copied your Hoogle 5 plugin there: http://mycroftproject.com/search-engines.html?name=hoogle&skipcache=20170327.

Also, Firefox has another feature that lets one add search shortcuts -- e.g. so that typing h <term> does a Hoogle search for <term> -- by associating keywords with bookmarks with "holes" in them; that feature is explained in the first paragraph here: http://kb.mozillazine.org/Using_keyword_searches.

ntc2 avatar Mar 27 '17 18:03 ntc2

It seems Firefox has diverged from Chrome/IE in this respect, which are the two browsers I tend to test on (since they tend to be at opposite ends of the spectrum). Interesting. I'm happy to take your guidance, and happy to maintain the code in Hoogle itself - it seems reasonable to keep everything together where it makes sense.

ndmitchell avatar Mar 27 '17 20:03 ndmitchell

I pushed a change that might help - let's see when it ends up on the server in about 12 hours.

ndmitchell avatar Apr 17 '17 14:04 ndmitchell

I'm still getting the same

Firefox could not download the search plugin from:
http://hoogle.haskell.org///cdn.rawgit.com/ndmitchell/hoogle/c2fe81420a6988ff5e15b9e2aea7422b2fc75243/html/search.xml

on http://hoogle.haskell.org.

ntc2 avatar Apr 19 '17 05:04 ntc2