Created
February 3, 2012 14:57
-
-
Save starzonmyarmz/1730552 to your computer and use it in GitHub Desktop.
Email Redmine issues (tickets) to your Wunderlist inbox using 'mailto'
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
// Email ticket to my Wunderlist | |
(function toWunderlist() { | |
var title = document.title | |
.replace(' - Cramer Dev', '') | |
.replace('Scrum Task ', ''), | |
url = document.location.href; | |
$('#content').find('.contextual').prepend('<a href="mailto:me@wunderlist.com?body=' + title + ' - ' + url + '" class="to-wunderlist">Add to Wunderlist</a>'); | |
})(); |
Made an custom version. With this, issue comments are included in the wunderlist notes.
function toWunderlist() {
var new_line = '%0D%0A';
var new_paragraph = new_line + new_line;
var subject = document.title;
var url = document.location.href;
var body = url;
if($('.wiki p').length > 0) {
body += new_line + '---';
$('.wiki p').each(function(){
body += new_paragraph + $(this).html().replace('<br>', new_line).replace(/<\/?[^>]+(>|$)/g, "");
});
}
$('#content').find('.contextual').prepend('<a href="mailto:me@wunderlist.com?subject=' + subject + '&body=' + body + '" class="to-wunderlist">+Wunderlist</a>');
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the .replace()'s can be modified to suite your needs depending on what is generated inside of your <title> tags