Gebruiker:Wimmel/common.js: verschil tussen versies
Uiterlijk
Verwijderde inhoud Toegevoegde inhoud
-editcount |
+Source links |
||
Regel 33: | Regel 33: | ||
}); |
}); |
||
*/ |
*/ |
||
/* |
|||
* This script adds "Source links" below "What links here" in the sidebar. |
|||
* "What links here" will include pages using a template with the link. |
|||
* "Source links" tries to search for pages where the link is in the source. |
|||
*/ |
|||
importScript(':en:User:PrimeHunter/Source links.js'); // Linkback: [[:en:User:PrimeHunter/Source links.js]] |
Huidige versie van 17 jul 2024 om 21:17
// [[Help:Helpdesk/Archief/mei_2024#Gebruikersbox_aantal_bewerkingen]]
/*
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
$(mw.util.addPortletLink('p-navigation', 'javascript:;', '❗Update Editcount', 'n-update-editcount', 'Update je editcount pagina', null, null )).click(function() {
var userName=mw.config.get('wgUserName'),
ecQuery = {
action: 'query',
list: 'users',
ususers: userName,
usprop: 'editcount',
format: 'json'
},
api = new mw.Api();
api.get(ecQuery).done( function(data) {
var editCount=data.query.users[0].editcount;
api.postWithToken("csrf", {
action: 'edit',
title: 'Gebruiker:' + userName + '/EditCount',
text: editCount,
summary: 'update editcount using script'
}).done(function(data) {
console.log( "Done: " + userName + " has " + editCount + " edits.");
}).fail( function(code, data) {
console.log( api.getErrorMessage(data).text());
});
});
});
});
*/
/*
* This script adds "Source links" below "What links here" in the sidebar.
* "What links here" will include pages using a template with the link.
* "Source links" tries to search for pages where the link is in the source.
*/
importScript(':en:User:PrimeHunter/Source links.js'); // Linkback: [[:en:User:PrimeHunter/Source links.js]]