vimium-c
vimium-c copied to clipboard
javascript doesn't work on vimium://urls
Describe the bug
javascript had been ignore when it launch by vimium://urls via Custom search engines.
To Reproduce
- Go to Vimium C options > Custom Search Engines
- Add following search engines:
g: https://www.google.com/search?q=%s Google
dd: https://duckduckgo.com/?q=%s&t=h_ DuckDuckGo
# make new page with title which you defined.
newpage: javascript:(function(){\
var\ newWindow=window.open();\
var\ title='%S';\
var\ content='<html><head><title>'+title+'</title></head><body><h1>'+title+'</h1></body></html>';\
newWindow.document.write(content);\
newWindow.document.close();\
})(); new page with title
tests: vimium://urls/g|dd|newpage:%S for test
- Use the custom search engine, then
newpagewill ignore.
Browser, OS and Vimium C versions
- Browser name: firefox
- Browser version: 133.0.3 (aarch64)
- Vimium C version: 1.99.997
- OS name and version: Mac OS
I love this extention btw❤️ Thank you!
Um the problem does exist - neither the vimium://urls URL command nor the openUrl urls=[...] mapping can run javascript: URLs.
This is a known limitation which is designed to simplify Vimium C's code and behaviors.
I'll fix a bug about vimium://urls in days, and then it should support embedded vimium://run well:
ba: https://www.baidu.com/s?ie=utf-8&wd=%s
bi: https://www.bing.com/search?q=$s
np: vimium://run/openUrl#keyword=bi&reuse=newtab&#url=$s
tests: vimium://urls/ba|np:%S for test
Then you may take a try to open javascript: ... inside a second vimium://run/<special_command>