MediaWiki

Gadget-statistics.js

From Dogcraft Wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (โŒ˜-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (โŒ˜-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
$(document).ready(function() {

function testAPIEdit() {
	
	var params = {
		action: 'edit',
		format: 'json',
		title: 'User:Domino/Sandbox',
		text: 'Hello',
		summary: 'Edit added with the API',
		bot : 1,
		
	},
	api = new mw.Api();

api.postWithToken( 'csrf', params ).done( function ( data ) {
} );
	
	
} 

	document.getElementById('gadgetSandboxButton').innerHTML = "<div id='gadgetSandboxButtoninner'><button  type='button' style='background:blue;'>Press this to get editcounts</button></div>";
	document.getElementById('gadgetSandboxButton').onclick = function() {testAPIEdit()};
});
This page was last modified on 4 July 2020, at 19:40. (10 months ago)
Background SRN Opening by Montenator