-
-
Save ayberk/7320910 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
var url = document.URL; | |
javascript:(function(){ | |
//window.twttr=window.twttr||{}; | |
var D=550,A=450,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0,F=document,E; | |
if(C>A){ | |
G=Math.round((C/2)-(A/2)) | |
} | |
var win =window.open('http://twitter.com/share','','left='+H+',top='+G+',width='+D+',height='+A+',personalbar=0,toolbar=0,scrollbars=1,resizable=1'); | |
//var win = window.twtter.shareWin; | |
win.focus(); | |
// If the window opened successfully (e.g: not blocked) | |
if (win) { | |
win.onload = function() {//onload can be blocked by the brower | |
win.getElementById("status").value = url; | |
}; | |
} | |
E=F.createElement('script');E.src='http://platform.twitter.com/bookmarklets/share.js?v=1'; | |
F.getElementsByTagName('head')[0].appendChild(E)}()); |
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
{ | |
"name": "Share on Twitter with URL", | |
"description": "A Backtick Hello World example command.", | |
"icon": "http://icons.backtick.io.s3.amazonaws.com/backtick.png", | |
"link": "http://backtick.io" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"name": "Example Command",
"description": "A Backtick Hello World example command.",
"icon": "http://icons.backtick.io.s3.amazonaws.com/backtick.png",
"link": "http://backtick.io"