Last active
June 14, 2020 17:24
-
-
Save jnovack/77aea1c0210bf6e082ef719ce10b71f8 to your computer and use it in GitHub Desktop.
Chrome Test for SSH Extension
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
var detect=function(base,if_installed,if_not_installed){ | |
var s=document.createElement("script"); | |
s.onerror=if_not_installed,s.onload=if_installed,document.body.appendChild(s),s.src=base+"/html/nassh.html" | |
}; | |
detect("chrome-extension://pnhechapfaindjhompbnflcldabbghjo", | |
function(){ | |
console.log("Yes"); | |
}, | |
function(){ | |
console.log("No"); | |
} | |
); | |
detect("chrome-extension://pnhechapfaindjhompbnflcldabbghjo", | |
function(){ | |
console.log("<a href='chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html#username@hostname'>SSH to Host</a>"); | |
}, | |
function(){ | |
console.log("<a href='https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo'>Download Extension</a>"); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment