Created
December 25, 2011 13:28
-
-
Save rskull/1519246 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
//選択した範囲をツイート欄にセットする。 | |
javascript:(function () { | |
var d = document; | |
var t = d.getSelection(); | |
var l = d.links; | |
var u = ''; | |
for (i=0;i<l.length;i++) { | |
if (l[i].innerHTML == t) { | |
u = l[i].href; | |
} | |
} | |
window.open('http://twitter.com/?status='+encodeURI(t)+u, 'win', 'height=350,width=350'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment