בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,360
רעדאגירונגען
(געשאַפן בלאַט מיט 'if ( mw.config.get('wgNamespaceNumber') === 6 ) $( function() { function deleteCommonsDuplicate(newName) { var api = new mw.Api(); mw.notify('כל השימושים בקובץ הוסרו'); if ( mw.config.get('wgUserGroups').indexOf('sysop') > -1) { api.postWithToken('edit', { action: 'delete', title: mw.config.get('wgPageName'), reason: 'הקובץ נמצא בוויקישיתוף: File:' + newName + '' }); } else {...') |
(אפדעיט) צייכן: צוריקגעשטעלט |
||
| שורה 6: | שורה 6: | ||
if ( mw.config.get('wgUserGroups').indexOf('sysop') > -1) | if ( mw.config.get('wgUserGroups').indexOf('sysop') > -1) | ||
{ | { | ||
api.postWithToken('edit', { action: 'delete', title: mw.config.get('wgPageName'), reason: '[[ | api.postWithToken('edit', { action: 'delete', title: mw.config.get('wgPageName'), reason: '[[וק:וש|הקובץ נמצא בוויקישיתוף]]: [[:File:' + newName + ']]' }); | ||
} | } | ||
else | else | ||
| שורה 12: | שורה 12: | ||
api.postWithToken('edit', { | api.postWithToken('edit', { | ||
action: 'edit', | action: 'edit', | ||
title: ' | title: 'ויקיפדיה:בקשות ממפעילים', | ||
section: 1, | section: 1, | ||
summary: '[[:' + mw.config.get('wgPageName') + ']] - [[ | summary: '[[:' + mw.config.get('wgPageName') + ']] - [[וק:וש|הקובץ נמצא בוויקישיתוף]]: [[:File:' + newName + ']]' , | ||
appendtext: '\n* {{בקשת מחיקה|' + mw.config.get('wgPageName') + '|קיים קובץ זהה בוויקישיתוף: [[:File:' + newName + ']]}} ~~'+'~~', | appendtext: '\n* {{בקשת מחיקה|' + mw.config.get('wgPageName') + '|קיים קובץ זהה בוויקישיתוף: [[:File:' + newName + ']]}} ~~'+'~~', | ||
tags: 'ניטור_תמונות' | tags: 'ניטור_תמונות' | ||
| שורה 24: | שורה 24: | ||
if($('#ca-history').length === 0) return; | if($('#ca-history').length === 0) return; | ||
/* | /* | ||
Replace image uses with commons copy or similar file | Replace image uses with commons copy or similar file | ||
| שורה 38: | שורה 38: | ||
requiredReplacements--; | requiredReplacements--; | ||
if (requiredReplacements === 0) deleteCommonsDuplicate(newName); | if (requiredReplacements === 0) deleteCommonsDuplicate(newName); | ||
}) | }); | ||
if ($('.mw-imagepage-linkstoimage a').length === 0) | if ($('.mw-imagepage-linkstoimage a').length === 0) | ||
{ | { | ||
| שורה 96: | שורה 96: | ||
if (!reason) return; | if (!reason) return; | ||
if (user.length != 1) { | if (user.length != 1) { | ||
user = prompt('שם מעלה התמונה' | user = prompt('שם מעלה התמונה'); // in past the default was user.join(', ') but this can confuse | ||
if (!user) return; | if (!user) return; | ||
} | } | ||
| שורה 102: | שורה 102: | ||
user = user[0]; | user = user[0]; | ||
} | } | ||
if ( user.indexOf(wgFormattedNamespaces[2]) === -1 ) user = ' | if ( user.indexOf(mw.config.get('wgFormattedNamespaces')[2]) === -1 ) user = mw.config.get('wgFormattedNamespaces')[3] +':' +user ; | ||
else user='שיחת ' + user; | |||
var api = new mw.Api(); | var api = new mw.Api(); | ||
| שורה 114: | שורה 115: | ||
if (d && d.edit && d.edit.result != 'Success') mw.notify('אירעה שגיאה'); | if (d && d.edit && d.edit.result != 'Success') mw.notify('אירעה שגיאה'); | ||
else { | else { | ||
var userNotice = new mw.Api(); | |||
userNotice.postWithToken('edit', { | |||
action: 'edit', | action: 'edit', | ||
title: | title: user, | ||
section: 'new', | section: 'new', | ||
sectiontitle: '[[:' + mw.config.get('wgPageName').replace(/_/g, " ") + ']]', | sectiontitle: '[[:' + mw.config.get('wgPageName').replace(/_/g, " ") + ']]', | ||
text: ' | text: '{{' + template + '}}\n~~' + '~~', | ||
tags: 'ניטור_תמונות' | tags: 'ניטור_תמונות' | ||
}).done(function( | }).done(function(dd) { | ||
window.location.reload(true); | window.location.reload(true); | ||
}); | }); | ||
| שורה 127: | שורה 129: | ||
}); | }); | ||
} | } | ||
/* common messages for handling files*/ | /* common messages for handling files*/ | ||
רעדאגירונגען