משתמש:Yanki14/monobook.js: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
Yanki14 (שיחה | תרומות)
אין תקציר עריכה
Yanki14 (שיחה | תרומות)
ביטול גרסה 107482 של Yanki14 (שיחה)
 
שורה 1:
importUserScript(11);
 
/*
* Adds option to add summary to rollback revets.
* Written by [[:he:User:Yonidebest]] based on [[:en:User:Ilmari Karonen]]'s script.
* Translated to Hebrew by [[User:ברק שושני]]
* Rewritten by [[User:קיפודנחש]]
*
*/
$(document).ready(function() {
var hist = mw.util.getParamValue('action') == 'history';
$('span.mw-rollback-link')
.append(hist ? ' | ' : '[')
.append(
$('<a>', {href: '#', title: 'שחזור מהיר עם תקציר', text: 'תקציר'})
.click(function() {
var summary = $.trim(prompt('אנא הזינו תקציר לשחזור') || '');
if (summary)
$(this).attr('href', $(this).siblings('a:first').attr('href') + '&summary=' + encodeURIComponent(summary));
}))
.append(hist ? '' : ']');
});