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

מאין תקציר עריכה
מ 11 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-wikibugs-patrol.js יובאו
 
(2 גרסאות ביניים של 2 משתמשים אינן מוצגות)
שורה 25: שורה 25:
var talkPage = new mw.Title(articleName).getTalkPage(),
var talkPage = new mw.Title(articleName).getTalkPage(),
newContent =  content.replace(/== .+? ==\n+/, '').replace(/\{\{\/מצב\|.+?\}\}/, '');
newContent =  content.replace(/== .+? ==\n+/, '').replace(/\{\{\/מצב\|.+?\}\}/, '');
return new mw.Api().post({action: 'edit', minor: 1, title: talkPage.getPrefixedText(), summary: 'העברת דיווח מהדף [[ויקיפדיה:דיווח על טעויות]]', token: mw.user.tokens.get('editToken'), section: 'new', sectiontitle: sectionTitle, text: ':דיווח מהדף [[ויקיפדיה:דיווח על טעויות]]\n' + newContent }).then(function(d){ mw.notify($('<a>', {href: talkPage.getUrl(), target: '_blank'}).text('אורכב בהצלחה')); });
return new mw.Api().post({action: 'edit', minor: 1, title: talkPage.getPrefixedText(), summary: 'העברת דיווח מהדף [[ויקיפדיה:דיווח על טעויות]]', token: mw.user.tokens.get('csrfToken'), section: 'new', sectiontitle: sectionTitle, text: ':דיווח מהדף [[ויקיפדיה:דיווח על טעויות]]\n' + newContent }).then(function(d){ mw.notify($('<a>', {href: talkPage.getUrl(), target: '_blank'}).text('אורכב בהצלחה')); });
}
}


שורה 31: שורה 31:
var summ = prompt('כותרת הדיווח:', 'דיווח שאורכב ב-{{ס:'+'#זמןמ:d xg Y}}');
var summ = prompt('כותרת הדיווח:', 'דיווח שאורכב ב-{{ס:'+'#זמןמ:d xg Y}}');
if(summ === null) return;
if(summ === null) return;
var articleName = $(this).parents('h2').find('a:first').prop('title').replace(' (הדף אינו קיים)', ''),
var articleName = $(this).parents('h2').find('.mw-headline a:first').prop('title').replace(' (הדף אינו קיים)', ''),
sectionNum = $(this).parent().find('a').attr('href').match(/section=(.*)/)[1],
sectionNum = $(this).parent().find('a').attr('href').match(/section=(.*)/)[1],
api = new mw.Api();
api = new mw.Api();
שורה 58: שורה 58:
var summ = prompt('תקציר עריכה למחיקת הדיווח:');
var summ = prompt('תקציר עריכה למחיקת הדיווח:');
if(summ === null) return;
if(summ === null) return;
var articleName = $(this).parents('h2').find('a:first').prop('title').replace(' (הדף אינו קיים)', ''),
var articleName = $(this).parents('h2').find('.mw-headline a:first').prop('title').replace(' (הדף אינו קיים)', ''),
sectionNum = $(this).parent().find('a').attr('href').match(/section=(.*)/)[1],
sectionNum = $(this).parent().find('a').attr('href').match(/section=(.*)/)[1],
api = new mw.Api();
api = new mw.Api();