Created
April 10, 2018 20:18
-
-
Save Chocimier/5f3de74ba504eb900c288a9abb68a923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modes.add_cmds({{ ":ddg", "Search with DuckDuckGo", | |
function (w, o) w.view:eval_js("(function(){ var form = document.createElement('form'); form.method='POST'; form.action='https://duckduckgo.com'; var input=document.createElement('input'); input.name='q'; input.value='".. o.arg .. "'; form.appendChild(input); form.submit(); })();", { | |
no_return = true, | |
callback = function (_, err) | |
w:error(err) | |
end, | |
}) end }}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment