ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

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

Open ntc2 opened 7 years ago

ntc2 commented 7 years ago

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?

ndmitchell commented 7 years ago

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 commented 7 years ago

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.

ntc2 commented 7 years ago

I'm using Firefox 52 on GNU/Linux.

On Sun, Mar 26, 2017 at 2:32 PM, Neil Mitchell notifications@github.com 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 .

ndmitchell commented 7 years ago

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

ntc2 commented 7 years ago

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.

ndmitchell commented 7 years ago

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 commented 7 years ago

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

ntc2 commented 7 years ago

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.