Created
June 29, 2017 03:12
-
-
Save Radvendii/10b5f434544a7bb35affc01646985716 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const jsdom = require("jsdom"); | |
const { JSDOM } = jsdom; | |
var html = process.argv[2]; | |
var dom = new JSDOM(html); | |
var ary = dom.window.document.getElementsByTagName("a"); | |
if(ary.length >= 1) | |
console.log(ary[0].getAttribute("href")); |
This file contains hidden or 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
#!/usr/bin/env bash | |
href=$(node /path/to/grabhref.js "$QUTE_SELECTED_HTML") | |
echo $href | |
echo "jseval window.location.href = '$href'" >> "$QUTE_FIFO" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment