MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 13: Line 13:
                 const resultDiv = document.getElementById(\"result\"); \
                 const resultDiv = document.getElementById(\"result\"); \
                 const api = new mw.Api(); \
                 const api = new mw.Api(); \
                 let DateInput = '+ dateInput +'; \
                 let date = $(#date input).value; \
                 api.get({ \
                 api.get({ \
                     action: \'expandtemplates\', \
                     action: \'expandtemplates\', \
                     prop: \'wikitext\', \
                     prop: \'wikitext\', \
                     text:\'{{#invoke:Roman Date| main | \' + DateInput.getValue() + \' }}\' \
                     text:\'{{#invoke:Roman Date| main | \' + date + \' }}\' \
                 }).done( function ( data ) { \
                 }).done( function ( data ) { \
                     resultDiv.innerHTML = data.expandtemplates.wikitext; \
                     resultDiv.innerHTML = data.expandtemplates.wikitext; \