User:Gryllida/js/TagEditing.js

//

var tagediting = { tag: function { var api = new mw.Api; api.postWithToken("edit", {				action: 'edit',				title: mw.config.get ('wgPageName'),				prependtext: '',				summary: 'added status tag: (s)'			}).done(function (data){				$('#tagediting').fadeOut;				jsMsg( 'Template added' );			}); },	init: function { var t = document.getElementById('t-whatlinkshere'); if (!t) return; var li = document.createElement('li'); var a = document.createElement('a'); a.setAttribute('href', 'javascript:tagediting.tag'); a.id = 'tagediting'; a.appendChild(document.createTextNode('tag editing')); li.appendChild(a); t.parentNode.appendChild(li); } };

mw.loader.using(['mediawiki.api'], function { tagediting.init; });

//