Skip to content

Instantly share code, notes, and snippets.

@jkishner
Last active December 20, 2015 12:29
Show Gist options
  • Save jkishner/6131858 to your computer and use it in GitHub Desktop.
Save jkishner/6131858 to your computer and use it in GitHub Desktop.
TweetBlog
var text = op.getLineText();
dialog.ask ("Enter link below", "", "", function (name) {
op.attributes.setOne("type", "link");
op.attributes.setOne("url", name);
var url = op.attributes.getOne ("url");
window.open("https://twitter.com/share?text=" + text + "&url=" + url,"_blank");
var date = clock.now().toDateString();
op.insert ("Posted: " + date, up);
op.attributes.setOne("icon", "twitter-sign");
op.go (down, 1);
op.reorg (right, 1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment