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

מ עדכון של משתמש:קיפודנחש
מ תיקון של קיפודנחש - תיקון איטיות מסוימת.
שורה 6: שורה 6:
  *
  *
  */  
  */  
$(document).ready(function() {
$(document).ready(function() {
        var hist = mw.util.getParamValue('action') == 'history';  
    var hist = mw.util.getParamValue('action') == 'history';  
        $('span.mw-rollback-link').append(
$('span.mw-rollback-link').append(
                $('<a>', {href: '#', title: 'שחזור מהיר עם תקציר'})
$('<a>', {href: '#', title: 'שחזור מהיר עם תקציר'})
                .text(hist ? ' | תקציר' : '[תקציר]')
.text(hist ? ' | תקציר' : '[תקציר]')
                .click(function() {
.click(function() {
                        var summary = $.trim(prompt('אנא הזינו תקציר לשחזור') || '');
var summary = $.trim(prompt('אנא הזינו תקציר לשחזור') || '');
                        if (summary)  
if (summary)  
                                window.location = $(this).parent().find('a:eq(0)').attr('href') + '&summary=' + encodeURIComponent(summary);
$(this).attr('href', $(this).parent().find('a:eq(0)').attr('href') + '&summary=' + encodeURIComponent(summary));
                }));
}));
});
});