ויקיציטוט:סקריפטים/2
מראה
//
// סקריפט 2: לקוח מ[[ויקיציטוט:סקריפטים/2]]
// פונקציה שמספקת תקציר עריכה אוטומטי כשעורכים גרסה ישנה. התקציר האוטומטי הוא "שחזור לגרסה x"
//
function oldVersEdit(){
if(document.location.search.indexOf("&action=edit&oldid=") != -1 && document.getElementById('mw-revision-info')!=null){
document.editform.wpSummary.value="שחזור לגרסה "+ document.location.search.substring(document.location.search.indexOf("&oldid=")+7,document.location.search.length);
}
}
addOnloadHook(oldVersEdit);
// עד כאן סקריפט 2