MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Convert to ECMAScript 5)
No edit summary
Line 10: Line 10:
         <script> \
         <script> \
             function submit(){ \
             function submit(){ \
                 const resultDiv = document.getElementById(\'result\'); \
                 const resultDiv = document.getElementById(\"result\"); \
                 const api = new mw.Api(); \
                 const api = new mw.Api(); \
                 api.get({ \
                 api.get({ \
                     action: \'expandtemplates\, \
                     action: \'expandtemplates\, \
                     prop: \'wikitext\', \
                     prop: \'wikitext\', \
                     text:\'{{#invoke:Roman Date|document.getElementById(\'date\').value}}\' \
                     text:\'{{#invoke:Roman Date|document.getElementById(\"date\").value}}\' \
                 }).done( function ( data ) { \
                 }).done( function ( data ) { \
                     console.log( data ); \
                     console.log( data ); \

Navigation menu