User:Gryllida/js/UnderReview.js

//

var underreview = { 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){				$('#underreview').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:underreview.tag'); a.id = 'underreview'; a.appendChild(document.createTextNode('tag under review')); li.appendChild(a); t.parentNode.appendChild(li); } };

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

//