Thread:Project:Support desk/API in JavaScript. Script edits not all pages from category

My script:

// this function from mediawiki.org function addNewSection( page, summary, content ) { var api = new mediaWiki.Api; api.postWithToken( "edit", { 		action: "edit", 		title: page, 		section: "new", 		summary: summary, 		text: content 	} ).done( function( result, jqXHR ) { 		mw.log( "Saved successfully" ); 		//location.reload; 	} ).fail( function( code, result ) { 		if ( code === "http" ) { 			mw.log( "HTTP error: " + result.textStatus ); // result.xhr contains the jqXHR object 		} else if ( code === "ok-but-empty" ) { 			mw.log( "Got an empty response from the server" ); 		} else { 			mw.log( "API error: " + code ); 		} 	} ); } // this function created by me. I called it as javascript:vld("some cat","some text"); in addressbar function vld (catname,addtext){ $.get ("/w/index.php",{"title":"Special:Export","addcat":"addcat","catname":catname,"pages":"XXXXX"},function(data){    ttt=data.split("")[1].split("</textarea")[0].split("\n"); // full list of pages from cat. I checked - working     for (t in ttt){       tt=ttt[t]       if(! (tt=="XXXXX")){        addNewSection(tt,"",addtext); // add section       }     }     alert("Done!");   }) }

Not all pages are edited. Why? How to make all the pages to be edited from the list?

problem solved. no help needed