Created
December 30, 2013 16:59
-
-
Save cuter44/8184723 to your computer and use it in GitHub Desktop.
[Bookmarklet]send page URL and selection via e-mail, adapted from douban bookmarklet.
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:void( | |
| function() | |
| { | |
| var to=prompt("收件人","[email protected]"), | |
| d=document, | |
| e=encodeURIComponent, | |
| s1=window.getSelection, | |
| s2=d.getSelection, | |
| s3=d.selection, | |
| s=s1?s1():s2?s2():s3?s3.createRange().text:'', | |
| r='mailto:'+to+'?subject=[发射!]'+e(d.title)+'&body='+e(d.location.href)+'%20'+s, | |
| x=function() | |
| { | |
| if (!window.open(r,'抄送','toolbar=0,resizable=1,scrollbars=yes,status=1,width=500,height=360')) | |
| location.href=r; | |
| }; | |
| if (/Firefox/.test(navigator.userAgent)) | |
| { | |
| setTimeout(x,0); | |
| }else{ | |
| x(); | |
| } | |
| } | |
| )(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment