מדיה ויקי:Gadget-RestoreWarnings.js: הבדלים בין גרסאות בדף

מ עדיף בלי ובהסכמתו של חיים
מ למנוע את מיוחד:חסימה/X
שורה 22: שורה 22:
warning = templ.m || templ.t,
warning = templ.m || templ.t,
linkTitle = templ.hasOwnProperty('linkTitle')? templ.linkTitle : true,
linkTitle = templ.hasOwnProperty('linkTitle')? templ.linkTitle : true,
OtherTitle = templ.hasOwnProperty('OtherTitle')? templ.OtherTitle : true,
tw = warning,
tw = warning,
refPage = $this.attr('refPage').replace(/_/g, ' ');
refPage = $this.attr('refPage').replace(/_/g, ' ');
שורה 43: שורה 44:
var text = "{{" + tw + "}} ~~" + "~~\n";
var text = "{{" + tw + "}} ~~" + "~~\n";
if (refPage)
if (refPage)
text = '\n==' + (linkTitle? "[[" + refPage + "]]" : refPage )+ '==\n' + text;
text = '\n==' + (OtherTitle? (linkTitle? "[[" + refPage + "]]" : refPage ) : warning ) + '==\n' + text;
save_topage("שיחת משתמש:" + user, warning, text, watchOrUnwatch(templ), function() {mw.util.jsMessage(' תבנית "' + warning + '" נרשמה בשיחת משתמש:' + user);});
save_topage("שיחת משתמש:" + user, warning, text, watchOrUnwatch(templ), function() {mw.util.jsMessage(' תבנית "' + warning + '" נרשמה בשיחת משתמש:' + user);});
}
}
שורה 86: שורה 87:
{t:"הועתק", m: "העתקה", tl:"הוספת אזהרת העתקה"}
{t:"הועתק", m: "העתקה", tl:"הוספת אזהרת העתקה"}
],
],
youWereBlocked = {t:"נחסמת", m: "נחסמת", tl:"הודעה למשתמש שנחסם"};
youWereBlocked = {t:"נחסמת", m: "נחסמת", tl:"הודעה למשתמש שנחסם", OtherTitle: false };


function makeSpan(forUser, forDeletePage, paragraph) {
function makeSpan(forUser, forDeletePage, paragraph) {