מדיה ויקי:Gadget-wikibugs-patrol.js: הבדלים בין גרסאות בדף
מ קישור לדף השיחה |
מ 11 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-wikibugs-patrol.js יובאו |
||
| (5 גרסאות ביניים של 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: 'העברת דיווח | 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(); | ||
| שורה 44: | שורה 44: | ||
} else { | } else { | ||
if (sectionText.indexOf('{{#lst:')!=-1) { | if (sectionText.indexOf('{{#lst:')!=-1) { | ||
removeSection(sectionNum, basetimestamp ,data.curtimestamp, 'ארכוב'); | removeSection(sectionNum, basetimestamp ,data.curtimestamp, '/* '+ articleName +' */ ארכוב'); | ||
} else { | } else { | ||
archiveToTalk(articleName, summ, sectionText).done(function(){removeSection(sectionNum, basetimestamp ,data.curtimestamp, 'ארכוב'); }); | archiveToTalk(articleName, summ, sectionText).done(function(){removeSection(sectionNum, basetimestamp ,data.curtimestamp, '/* '+ articleName +' */ ארכוב'); }); | ||
} | } | ||
} | } | ||
| שורה 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(); | ||