Skip to content

Instantly share code, notes, and snippets.

@starzonmyarmz
Created February 3, 2012 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starzonmyarmz/1730552 to your computer and use it in GitHub Desktop.
Save starzonmyarmz/1730552 to your computer and use it in GitHub Desktop.
Email Redmine issues (tickets) to your Wunderlist inbox using 'mailto'
// 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>');
})();
@starzonmyarmz
Copy link
Author

the .replace()'s can be modified to suite your needs depending on what is generated inside of your <title> tags

@HendrikRoth
Copy link

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>');
}

Wunderlist+Redmine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment