Il suffit d'ajouter ce script-ci sur toutes les pages :
- Code:
/\/(privmsg\?mode=post_profile(&u=[1-9][0-9]*)?|postp\/[1-9][0-9]*)/.test(document.location.href) && $(document).on('click',"input[type='submit'][name='post']",function() {
var c = $("#logout img").attr("title").replace(/^.* \[ (.*?) \]$/, "$1"), d = $("input[type='hidden'][name='username']").val();
if($("input[type='text'][name='subject']").val() != "" && $("#text_editor_textarea").val() != "" && c != d) {
$.ajaxSetup({async:!1});
var a = 0, b = /^.*\/(privmsg\?mode=post_profile&u=([1-9][0-9]*)|postp\/([1-9][0-9]*))$/;
b.test(document.location.href) ? a = document.location.href.replace(b, "$2$3") : b.test(document.referrer) && (a = document.referrer.replace(b, "$2$3"));
$.post("/privmsg", {"username[]":d, subject:"Nouveau message de profil", message:"{USERNAME},\n\n" + c + " a mis un message sur votre profil.\n\n" + (a ? "Vos messages de profil : http://" + document.location.host + "/u" + a + "wall" : "Votre profil : {USERLINK}"), mode:"post", post:"Envoyer"});
$.ajaxSetup({async:!0})
}
return!0
});