Widget:EditSandbox: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 27: | Line 27: | ||
$.each(data.query.pages, function(index, value){ | $.each(data.query.pages, function(index, value){ | ||
var token = value.edittoken; | var token = value.edittoken; | ||
addNewSection( | addNewSection( "Edit'd!", token ); | ||
})}}); | })}}); | ||
} | } | ||
function addNewSection( | function addNewSection( content, editToken ) { | ||
$.ajax({ | $.ajax({ | ||
url: mw.util.wikiScript( 'api' ), | url: mw.util.wikiScript( 'api' ), | ||
Line 39: | Line 39: | ||
title: 'User:Matt_Pijoan/GroundZero', | title: 'User:Matt_Pijoan/GroundZero', | ||
section: 'new', | section: 'new', | ||
appendtext: content, | appendtext: content, | ||
token: editToken | token: editToken |