I change line 80s function to the below code to get a link with an image, the track/album name, and artist name and somewhere to place a network logo…. This suits my needs perfectly Brady’s code utilises the taget option on the link, mine forces it.
I hope this helps someone else ??
$(settings.resultsContainer).delegate('.ma-result', 'click', function(e) {
var defaultText = $('.title strong', this).text();
var defaultText2 = $(this).find('.artist').text();
var afftype ="";
var afftype = $('#ma-query-service').val();
//alert(afftype);
var attrs = {
href : $(this).find('a').attr('href'),
target: '_blank',
class: 'affiliate affiliate-' +afftype
}
//alert($(this).html());
var tuneimage = $(this).find('img').attr('src');
if ($('#ma-link-target-blank').attr('checked') == 'checked') {
attrs.target = '_blank';
}
var linkHtml = $('<a><span class="aff-icon"></span><img src="'+tuneimage+'"/><span class="title">' + defaultText+'<span class="artist">'+defaultText2+'</span></a>').attr( attrs ).wrap('<div></div>').parent('div');
tuneEditor.sendLinkToEditor( linkHtml.html(), attrs, defaultText );
});
Again, Thanks for the great plugin guys.