Giter Site home page Giter Site logo

bang's People

Contributors

finefindus avatar melusc avatar sophie-glk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bang's Issues

[Feature Request] Autoupdate bangs.json

If you use bangs that translate from a language to another (e.g. !enit), the search engine redirects you to Google Translate without adding the searched words in the translation form (on DuckDuckgo it works fine).

Edit: thanks to @babastienne for pointing out that the issue is related to a problem with the bangs.json file.

Use branches to keep your code clean

More a suggestion than a issue :

I recommand you to work with gitflow in order to keep your code clean and working.

  • The branch master will host the version of the code used in production (aka the code available on the store)
  • The branch develop contains the next version of the code before it is put in production. This branch contains code that is always working and not code currently being developped.
  • The branch feature/name_of_the_feature will contain the code currently in development related to a specific feature.

When the feature is done and fully tested the branch feature/name_of_the_feature is merged on develop.
When the new version of the code is put in production the branch develop is merge into master.

This is a "simplified" version of gitflow that I stated here.
For more informations about gitflow I strongly recommand you to look at those two links :

Using branches on github is definitely the best practise to respect if you want to avoid loosing code or introduce bugs.

Anyway, if you don't care you can just ignore this issue. ๐Ÿ˜„

!bang opens non-existant page

!bang points to /bang?q={{{s}}} which means that the final url will be something like moz-extension://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/bang?q={{{s}}}.

Support bangs anywhere in the query

While bangs in the beginning of the query are very helpful, DuckDuckGo supports bangs anywhere in the query. Supporting bangs anywhere in the search query can be very useful if you decide to use a bang after typing the query.

Could this feature be added? I looked through the source code and it doesn't look too bad to implement. It would require searching each word in the query for a bang as opposed to just the first word:

var bang = search.split(" ")[0];
It seems like nothing else would need to be done, as this extension doesn't seem to be responsible for trimming the bang from the search query anyway; instead, DuckDuckGo does this after this extension passes the raw search query to it.

Example interaction with DuckDuckGo using bangs at the end of the query:

Search: Environment variables !aw

should use the !aw bang and search the ArchWiki for "Environment variables".

Another DuckDuckGo example:

Search: Environment !aw variables

should again use the !aw bang and search the ArchWiki for "Environment variables"

Mobile version

It'd be super useful to have this add-on also usable on mobile.

Bad interception of requests in address bar

Context :

I'm doing a research in the address bar of firefox.
Example : !g foo bar
My default search engine is ecosia.

Expected behaviour :

The research is intercepted by the extension and the request is changed to search on google. The page displayed is the results of google.

Behaviour :

The request is not intercepted immediately. There is a first request made on ecosia instead of google.
The ecosia result is displayed :
image
Only after it is displayed the new request is made on google and the page is changing again to display the google results :
image

Problem :
This multiply the requests made and create a small amount of time where firefox can't be used to do anything else.
Because if I do my research and then promptly change to a second tab then the first tab will display the ecosia research and the google results will be displayed in the second tab.

I thought that the webRequest.onBeforeRequest would be able to intercept the initial request but when looking at your code you already used it so I'm not sure of how to solve this issue, otherwise I would have done a pull request.
Not sure if the description is complete enough to understand the problem. Don't hesitate to ask for more informations in case of need.

[Bug?] Bangs are case sensitive

I apologize in advance if this is an end-user issue (i.e. I'm a moron).


Bang shortcuts in lowercase work as intended...
image
image

But do a normal search when in uppercase.
image
image

Is this intended?

I'm feeling lucky support

In DDG, you can use \ to go straight to the first search result, for example

\yt starless king

to open first search result on youtube of starless king

Or add ! at the end, for example

black hole !

It would be quite useful, especially the \

Different behaviour from DuckDuckGo when no whitespace before !

In DuckDuckGo, when searching abc!b it would search "abc" using Bing. This addon however just searches abc!b in the default search engine. I can see how this could be considered a feature, but in my opinion its mildly annoying as I am used to how DuckDuckGo works, and I often carelessly put no space before the !. I my opinion, it would make sense if this addon would emulate DuckDuckGo as closely as possible.

"De Mauro Dictionary" bangs do not work

!dit and !demauro should search for words in the Internazionale De Mauro dictionary, and they works fine on DuckDuckGo, but they give a "404 page not found" error when used through the addon.

Add pattern matching for bangs

If I want to use multiple bangs to redirect on the same URL I need to duplicate the URL so I was thinking about using a pattern matching in order to make it easier.

Example

For example if I want to use the bang !spotify to search a music and also want it to works when I use the bang !spoti, today I need this configuration :
image

Maybe using a pattern like `"spoti"||"spotify" it could work and be like that :

image

First occurence of "bang" is replaced instead of the correct "bang"

Examples

!banggood foobar:
actual: https://www.foobargood.com/index.php?keywords=bang&cat_id=0&com=search
expected: https://www.banggood.com/index.php?keywords=foobar&cat_id=0&com=search

!tbbtwiki foobar:
actual: https://bigfoobartheory.wikia.com/wiki/Special:Search?search=bang&fulltext=Search&ns0=1&ns14=1#
expected: https://bigbangtheory.wikia.com/wiki/Special:Search?search=foobar&fulltext=Search&ns0=1&ns14=1#

Also !bkkpost foo doesn't work, maybe for the same reason as above?

"I'm feeling lucky" search

it would be great to have this DDG feature in the extension.

Basically when searching DDG if you just put a ! in your search with a space preceding and following it, it will do an "I'm feeling lucky" and bring you directly to the page of its first result

The search query for this in DDG is quite simple

In my region, this is the query i get for searching something:
https://duckduckgo.com/?q=something+%21&t=ha&va=j

Also thank you for making this amazing extension. was hoping to use ecosia for ethical reasons but couldn't do without DDG bangs and you've made this possible :)

Beta feature with custom search engine not working

While testing the last version of the module (currently on the master branch), I noticed that you added a new Beta feature.

While trying to use it, an error message was displayed saying that Firefox was unable to locate the search plugin.
Those links seems to be dead because the return a 404 error :

Option to use only custom bangs

When I change the bang prefix to something easy to use, it triggers unintended bangs.
Specifically, I would like to prefix it with "space".

I would love to have this option as I usually only use some bangs.

Bang search fails on multi-character bangs on mobile

Tested with Firefox Mobile. I'm not sure if this is something you can address, but the regex for detecting a bang on Firefox Mobile (Android) seems to be limited to recognizing single-character bangs

After mistakenly opening an issue on this repo when i meant to do so on this one, I discovered they both are suffering from this problem. It could be a firefox issue, or it could be a difference in how regex is processed on mobile? ๐Ÿคทโ€โ™‚๏ธ

Annoying notification dot is displayed

On any site Firefox displays annoying notification dot - both inside extensions menu and on toolbar.

Annoying notification dot is displayed on all tabs for any site - aside from sites extension has specifically requested permissions (Google, Bing, ect).

Clicking extension will make it disappear temporary - it will show up on page (re)load.

Dot on toolbar:
Notification Dot 1

Dot in unified extensions menu:
Notification Dot 2

Startpage opens first result

Thanks for making this addon.

I'm using Startpage, but lately when I search anything it will open the first result instead of showing Startpage results. This happens most of the times, but not always.

Support regional bangs

Bangs such as !am will use your search region to determine where to send you, so for me DDG takes me to amazon.co.uk, whereas the extension will always use amazon.com. It'd be great for the extension to support this, as otherwise I have to remember to use the regional variant of the bang, assuming there is one (there is for Amazon, !amuk in my case).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.