philc / philc/vimium

Custom javascript search engine in a new tab

Open
#3,164 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Using chrome 69.0.3497.100
Using vimium 1.64

I recently found it is possible to add javascript search engines.
I had a really hard time figuring out why this search did not result in a new tab:

with this key mapping:

map sd Vomnibar.activateInNewTab keyword=ddg

and this code:

ddg: javascript:location='https://duckduckgo.com/?q=site:'+escape(location.hostname.replace(/^www\./,""))+'+%s' Search current domain on DDG

So I tried changing location= to window.open() but that resulted in a blocked popup. I wouldn't want to go and disable the popup-blocker on every site I want to search, so that's a no go.

Should Vomnibar.activateInNewTab work with javascript: search engines? Or is there another recommended way of achieving a new tab?

Thanks,
Vimium is great

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing the Vomnibar.activateInNewTab mapping with the provided javascript: search engine in Chrome, then inspect the relevant new-tab and search-engine handling. Done means establishing whether this combination should work and documenting or testing the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.