User:CWii/JB2script.js: Difference between revisions

Content deleted Content added
CWii (talk | contribs)
wow.
CWii (talk | contribs)
update
Line 92:
old_area.parentNode.replaceChild( work_area, old_area );
break;
}
}
 
jb2script.callbacks = {
yes: {
main: function ( self ) {
Status.info( 'Tagging image","[[' + wgPageName + ']]' );
// Tagging article
var query = {
'title': wgPageName,
'action': 'submit'
};
var wikipedia_wiki = new Wikipedia.wiki( 'Tagging image with tag', query, jb2script.callbacks.yes.image );
wikipedia_wiki.params = self.params;
wikipedia_wiki.get();
},
image: function( self ) {
var form = self.responseXML.getElementById('editform');
var postData = {
'wpMinoredit': undefined, // Per memo
'wpWatchthis': form.wpWatchthis.checked ? '' : undefined,
'wpStarttime': form.wpStarttime.value,
'wpEdittime': form.wpEdittime.value,
'wpAutoSummary': form.wpAutoSummary.value,
'wpEditToken': form.wpEditToken.value,
'wpSummary': "Tagging for moval by [[User:John Bot II]]",
'wpTextbox1': "\{\{Jb2move}}\n" + form.wpTextbox1.value
};
self.post( postData );
}
}
}