User:Writ Keeper/Scripts/teahouseTalkbackLink.js: Difference between revisions

Content deleted Content added
test
clear out tipsy, since it's deprecated
Line 10:
talkbackSubmit($(this).attr('href').substr(1), this.id)
});
$($link).after("<!--1-->|");
$($link).after($newLink);
$($link).after("<!--2-->|");
$($link).after($('<a href='+(($link[0].href).replace("User_talk:", "Special:Contributions/"))+' style="font-size:x-small; display:inline-block;">C</a>'));
$($link).after("<span><!--13-->|");
}
}
$('a[title="Send a talkback!"]').tipsy({html: true}).before("<!--2-->|").after("<!--3-->|</span>");
}
}
Line 21 ⟶ 22:
var questionTitle = prompt("Please enter the title of the question you're replying to (or just leave it blank):", ""), sectionTitle = "{{Wikipedia:Teahouse/Teahouse talkback|WP:Teahouse|";
if (questionTitle === null) {
$("#"+id).attr("title", 'You canceled the talkback!').tipsy("show");
return;
}
Line 50:
alert("Talkback posted!");
} else {
$alert("#"+id).attr("title", 'There was an error requesting the page edit. Code: ' + data.error.code + '": ' + data.error.info).tipsy("show");
}
},
error : function() {
$alert("#"+id).attr("title", 'There was an error using AJAX to edit the page.').tipsy("show");
}
});
}
if(mw.config.get('wgPageName') === "Wikipedia:Teahouse") {
teahouseTalkbackLink();
mw.loader.using( 'jquery.tipsy', function () { $(teahouseTalkbackLink); } );}
}