[00:00:34] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] (minor edit /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive */ ) ▶ https://en.wikipedia.org/w/index.php?diff=573424754 [00:01:33] [[Technical_13]] modified [[User:Technical_13/SandBox/Section_edit.js]] (minor edit minor ) ▶ https://en.wikipedia.org/w/index.php?diff=573424888 [00:05:56] [[Legobot]] modified [[User_talk:Technical_13]] (bot edit /* Please comment on Wikipedia talk:Consensus */ new section ) ▶ https://en.wikipedia.org/w/index.php?diff=573425334 [00:12:56] [[Technical_13]] modified [[User:Technical_13/SandBox/Section_edit.js]] ( .parseInt() ) ▶ https://en.wikipedia.org/w/index.php?diff=573426010 [00:13:13] [[Technical_13]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( yep ) ▶ https://en.wikipedia.org/w/index.php?diff=573426035 [01:03:04] [[Theopolisme]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive */ explain ) ▶ https://en.wikipedia.org/w/index.php?diff=573430681 [01:14:05] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive */ ) ▶ https://en.wikipedia.org/w/index.php?diff=573431699 [01:30:46] [[Theopolisme]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive */ no ) ▶ https://en.wikipedia.org/w/index.php?diff=573433454 [01:46:02] [[Technical_13]] modified [[User:Technical_13/SandBox/Section_edit.js]] ( save ) ▶ https://en.wikipedia.org/w/index.php?diff=573435129 [02:04:00] !Gadget-listStyles [02:04:00] You can use [[en:User:Technical 13/Scripts/Gadget-listStyles.js]] to change all bulleted lists to numbered ones! Take the mystery out of counting items in a list! Simply follow the instructions on [[en:User:Technical 13/Scripts/Gadget-listStyles]]. [06:27:26] [[Equazcion]] modified [[User_talk:Technical_13]] ( /* The Progressive Barnstar */ new section ) ▶ https://en.wikipedia.org/w/index.php?diff=573459407 [11:58:27] [[Technical_13]] modified [[User:Technical_13/Feedback]] ( /* September */ +1 ) ▶ https://en.wikipedia.org/w/index.php?diff=573487224 [12:03:10] [[Technical_13]] modified [[User:Technical_13]] ( /* Other stuffs */ https://toolserver.org/~snottywong/cgi-bin/adminscore.cgi?name=Technical+13 ) ▶ https://en.wikipedia.org/w/index.php?diff=573487795 [12:30:13] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:Articles for creation/SHORE Solutions Inc. */ new section ) ▶ https://en.wikipedia.org/w/index.php?diff=573490548 [14:37:50] [[Technical_13]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:Articles for creation/SHORE Solutions Inc. */ RE ) ▶ https://en.wikipedia.org/w/index.php?diff=573504672 [15:42:05] [[Technical_13]] modified [[User:Technical_13]] ( Updating software list. ) ▶ https://en.wikipedia.org/w/index.php?diff=573512217 [17:39:28] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Blank sandboxes */ new section ) ▶ https://en.wikipedia.org/w/index.php?diff=573527427 [19:16:42] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive */ ) ▶ https://en.wikipedia.org/w/index.php?diff=573540310 [19:19:50] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive again */ new section ) ▶ https://en.wikipedia.org/w/index.php?diff=573540706 [19:22:12] [[Technical_13]] modified [[User:Technical_13/Logs/CSD]] ( Logging speedy deletion nomination of [[Wikipedia talk:Articles for creation/List of programs broadcast by Network Ten]]. ([[WP:TW|TW]]) ) ▶ https://en.wikipedia.org/w/index.php?diff=573541013 [20:04:35] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive again */ tyo ) ▶ https://en.wikipedia.org/w/index.php?diff=573546838 [20:28:31] [[Theopolisme]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Wikipedia talk:WikiProject Articles for creation/October 2013 Backlog Elimination Drive again */ done ) ▶ https://en.wikipedia.org/w/index.php?diff=573549957 [20:31:11] [[Theopolisme]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Blank sandboxes */ reply to Anne ) ▶ https://en.wikipedia.org/w/index.php?diff=573550277 [21:11:24] 08] <+RoanKattouw> Technical_13: I'm not sure there are docs but you can piece it together from the API docs and the jQuery .ajax() docs. The basic idea (this might have typos) is $.ajax( { 'url': mw.util.wikiScript( 'api' ), 'data': { 'action': 'query', 'prop': 'revisions', 'titles': 'Main_Page', 'rvprop': 'content', 'indexpageids': 1, 'format': 'json' }, 'dataType': 'json', 'type': 'POST', 'success':... [21:11:25] [17:08] <+RoanKattouw> ...function( data ) { var wikitext = data.query.pages[data.query.pageids[0]].revisions[0]['*']; } } ); [21:15:58] :14] <+RoanKattouw> So, function getPageText( callback ) { $.ajax ( ...... then in success function: callback( pageID, pageCurrText ); } then invoke with getPageText( function( id, text ) { do stuff with id and text } ); [21:16:01] [17:15] <+RoanKattouw> The recommended way is to use a promise, which is a fancier way of doing a callback that allows for more than one thing to be notified when it's done, and in general is a standard pattern [21:16:45] :16] <+RoanKattouw> That would look like function getPageText() { var deferred = $.Deferred(); $.ajax( .... on success: deferred.resolve( pageID, pageCurrText ); ... ); return deferred.promise(); } then invoke with getPageText().done( function ( id, text ) { do stuff with id and text } ); [21:19:26] 18] <+RoanKattouw> The nice thing about the promise approach is that you can store the return value of getPageText() in a variable, and then whenever you need to do something with it, you can schedule something to happen once it's done [21:19:26] [17:19] <+RoanKattouw> So you could do textPromise = getPageText(); in the setup, which will kick off the AJAX request in the background, and then when the user does something that requires you have the page text, you can do something like showSpinner(); textPromise.done( function ( text ) { hideSpinner(); do stuff with text; } ); [21:21:22] :19] <+RoanKattouw> The stuff inside the .done( ... ) function will execute immediately if the text is already there, and otherwise it'll be deferred until it arrives [21:21:22] [17:19] <+RoanKattouw> Oh, that's even better [21:21:22] [17:20] <+RoanKattouw> So, you want to build new text based on the old text and then submit that as an edit? [21:21:22] [17:20] Yes. [21:21:22] [17:20] <+RoanKattouw> Then you should do something like getPageText().done( function( text ) { var newText = text.replace( whatever ); makeEdit( newText ); } ); [21:28:27] [[Anne_Delong]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Blank sandboxes */ explanation ) ▶ https://en.wikipedia.org/w/index.php?diff=573557510 [22:53:10] !Gadget-listStyles [22:53:11] You can use [[en:User:Technical 13/Scripts/Gadget-listStyles.js]] to change all bulleted lists to numbered ones! Take the mystery out of counting items in a list! Simply follow the instructions on [[en:User:Technical 13/Scripts/Gadget-listStyles]]. [22:53:14] @link [22:53:14] http://enwp.org/User:Technical_13/Scripts/Gadget-listStyles.js http://enwp.org/User:Technical_13/Scripts/Gadget-listStyles [23:07:12] Only two users other than me. [23:07:15] Hrmm. [23:33:35] hmmm does bugzilla allows wikilinks? [23:41:06] [[Technical_13]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( HasteurBot doesn't delete [[CSD:G13]]s ) ▶ https://en.wikipedia.org/w/index.php?diff=573571495 [23:47:33] Yes [23:58:42] [[Theopolisme]] modified [[Wikipedia_talk:WikiProject_Articles_for_creation/Helper_script]] ( /* Blank sandboxes */ userspace ) ▶ https://en.wikipedia.org/w/index.php?diff=573572905 [23:59:40] Technical_13: good