Created
April 18, 2013 07:32
-
-
Save pid/5410885 to your computer and use it in GitHub Desktop.
Asana Bookmarklet
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
// Replace <PROJECT-ID> with your project id | |
javascript: var trim12 = function trim12(str) { | |
var str = str.replace(/^\s\s*/, ''), | |
ws = /\s/, | |
i = str.length; | |
while (ws.test(str.charAt(--i))); | |
return str.slice(0, i + 1); | |
}; | |
location.href = 'mailto:x+<PROJECT-ID>@mail.asana.com?SUBJECT=' + encodeURIComponent(trim12('' + document.title)) + '&BODY=' + encodeURIComponent(trim12(document.title)) + encodeURIComponent('\n\n' + location.href) + encodeURIComponent('\n\n%3E' + window.getSelection()); | |
javascript:var trim12=function trim12(a){for(var a=a.replace(/^\s\s*/,""),b=/\s/,c=a.length;b.test(a.charAt(--c)););return a.slice(0,c+1)};location.href="mailto:x+<PROJECT-ID>@mail.asana.com?SUBJECT="+encodeURIComponent(trim12(""+document.title))+"&BODY="+encodeURIComponent(trim12(document.title))+encodeURIComponent("\n\n"+location.href)+encodeURIComponent("\n\n%3E"+window.getSelection()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment