Skip to content

Instantly share code, notes, and snippets.

@nbelyh nbelyh/start-putty.js
Last active Sep 2, 2017

What would you like to do?
SVGPublish: sample script to open ssh:// hyperlinks. Supposed to work with conjunctions with custom script on the client side. Please see starting-putty-from-an-exported-html-diagram for details
diagram.selectionChanged.add(function(shapeId) {
if (shapeId) {
var shape = diagram.shapes[shapeId];
if (shape) {
var ip = shape.Props['IP Address'];
if (ip) {
var url = 'ssh://' + ip;
// make a new link and click it
$("<a>").attr("href", url)[0].click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.