swift-selection-search icon indicating copy to clipboard operation
swift-selection-search copied to clipboard

POST requests support

Open cheater opened this issue 2 years ago • 8 comments

As in the title. A lot of things use POST requests. Forums are a great example of that.

The easiest way to get there is to have two input boxes in the configuration: one that has the POST endpoint URL (including GET parameters if those are necessary), and one that has a JSON object that contains all the POST parameters required for performing the search. Various POST parameters are required because eg on some websites you have to include some of them for the endpoint to run the search at all - otherwise you get an error or get dumped to the front page.

I would really appreciate this as most of the sites I use daily have POST search engines.

cheater avatar Dec 25 '21 21:12 cheater

example endpoint URL: https://foo.bar.com/search/?quux=baz example POST JSON object: {"sections": [1, 22, 75, 91, 102], "search": "{searchTerms}", "orderBy": 7, "order": "ASC"}

cheater avatar Dec 27 '21 14:12 cheater

Hi! As mentioned, SSS is not in active development, so feature requests are currently not being considered. Sorry! That said, you are right, POST search engines are still one of the most important features missing from SSS. :) The lack of this feature is also mentioned in issues #174 and #201, with different wordings. Sorry I can't be of much help. Cheers and have a happy new year! 🎉

CanisLupus avatar Dec 29 '21 17:12 CanisLupus

Thanks CanisLupus for your excellent work!

Fork with POST request:

https://addons.mozilla.org/en-US/firefox/addon/searchfrompopuporcontextmenu/

https://github.com/YoshifumiFuyuno/Search-from-Popup-or-ContextMenu

Different

Fork Changes (Based on SSS Version 3.33.0): Now works with Chromium-based browsers such as Microsoft Edge and Google Chrome. The site's Content Security Policy(CSP) does not change. (Original Extension(SSS) rewrites CSP to "unsafe-inline" after Ver.3.40.0) You can search on multiple search engines at once. support POST Method search engine. support search engine folder management. added highlighting and auto-scrolling features. added Popup Style ("Icon only" / "Icon and Name" / "Name only"). (At "Icon only", the display mode can be temporarily switched by double-clicking) support Bookmarklet. You can use Bookmarklet APIs. (It can also be executed automatically when the popup is displayed) / (You can also import bookmarklets from your Bookmarks) added Search box to Popup. added omnibox search. support suggestions from Google or DuckDuckGo or Qwant or Bing or Яндекс(Yandex) or 百度(Baidu) in the popup search box or omnibox search. added Hotkey search. added a function to easily add a search engine from the text box context menu. added search URL {linkurl}. {linkurl} is supports "Advanced usage". (Used when you want to search by link URI. For Firefox, you can also do this by holding down the Ctrl key and selecting the context menu) If no text is selected, the Clipboard Text is searched. Context menu display options. You can also search by link text or image URL. added Popup Opening behaviour "click" / "drag" added "Popup/icons behaviour" -> "Right mouse button click" / "Right mouse button Long-click" / "Left mouse button Long-click" added "Context menu" -> "Middle mouse button click" / "Right mouse button click" added Open in Window ("reuse new window" / "reuse new background window" / "new incognito (private) window" / "reuse new incognito(private) window" / "new background incognito(private) window" / "reuse new background incognito(private) window" / "new popup window" / "reuse new popup window" / "new background popup window" / "reuse new background popup window" / "sidebar (tab-specific)" / "sidebar (window-specific)" / "sidebar (global)") (sidebar UserAgent can be changed) / (The Popup window can be closed automatically.(Off/LostFocus/Mouseleave)). added Open in Tab ("reuse active tab" / "reuse new tab" / "reuse new background tab" / "reuse new tab (next to current tab)" / "reuse new background tab (next to current tab)") added Ability to show last used engine first in popup. added Hide Popup with ESC key etc. added browserAction. Allow "open-popup" Command to display popup even if no string is selected. support charset (UTF-8, RAW(GET method only), Shift_JIS(SJIS), EUC-JP, ISO-2022-JP(JIS), windows-1251, windows-1252(ISO-8859-1), Big5, GB18030). When the OS is set to dark mode, the option page is displayed in dark mode. Import/Export Compatibility with the Original Extension Ver.3.33.0: Import can also import file from the Original Extension. File exported by SPC is not compatible with the Original Extension Search engines setting. Permissions different from Original Extension Ver.3.33.0: removed permissions: downloads, webNavigation. added permissions: clipboardRead(Clipboard text search), unlimitedStorage(data: scheme icons). added optional_permissions: bookmarks(Import bookmarklet), webRequest(Sidebar user agent), webRequestBlocking(Sidebar user agent). From normal permissions to optional_permissions: clipboardWrite(copyToClipboard As Html/Text).

githubbapoopa avatar Feb 02 '22 18:02 githubbapoopa

Thank you!

cheater avatar Feb 03 '22 18:02 cheater

@gthbububba I will be testing your version and I have already added a bunch of feature requests. I hope you can make them happen :-) thank you!

cheater avatar Feb 03 '22 20:02 cheater

I'm not the developer of "Search from Popup or ContextMenu"

https://addons.mozilla.org/de/firefox/user/15076787/

What do you expect exactly by bombing the developer with 22! issues in 2hours? The git repo is 2 years old.

githubbapoopa avatar Feb 04 '22 01:02 githubbapoopa

"bombing" nice, dude.

cheater avatar Feb 04 '22 06:02 cheater

POST is fully supported by SPC, as well as it has a lot of other features. That solves it for me. I'll keep this open so others don't open an issue like this again.

cheater avatar Feb 13 '22 14:02 cheater