MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Test_Page3",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "200": {
                "pageid": 200,
                "ns": 0,
                "title": "Replace the default WikiEditor signature button with a custom signature button",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Created and tested for MediaWiki 1.39.x and may work for more recent versions, too.\n\n<div style=\"float: right\">__TOC__</div> \n=== JavaScript ===\nAdd the following code to the \"MediaWiki:Common.js\" page\n<syntaxhighlight lang=javascript>\n// <nowiki>\nvar customizeToolbar = function () {\n    /**\n     * Add the custom signature button to the existing \"main\" group\n     */\n    $('#wpTextbox1').wikiEditor('addToToolbar', {\n        section: 'main',\n        group: 'insert',\n        tools: {\n            \"customSignature\": {\n                label: 'Signatur einf\u00fcgen',\n                type: 'button',\n                icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/OOjs_UI_icon_signature-ltr.svg/20px-OOjs_UI_icon_signature-ltr.svg.png',\n                action: {\n                    type: 'encapsulate',\n                    options: {\n                        pre: ' --~~~~',\n                        post: '',\n                        ownline: false\n                    }\n                }\n            }\n        }\n    });\n};\n\n/**\n * Check if the view is in edit mode and the required modules are available. Then, customize the toolbar \u2026\n */\nif ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {\n    mw.loader.using('user.options').then(function () {\n        if (mw.user.options.get('usebetatoolbar') == 1) {\n            $.when(\n                mw.loader.using('ext.wikiEditor'), $.ready\n            ).then(customizeToolbar);\n        }\n    });\n}\n// </nowiki>\n</syntaxhighlight>\n\n=== CSS ===\nAdd the following code to the \"MediaWiki:Common.css\" page\n<syntaxhighlight lang=javascript>\n/** WikiEditor\n * Hide the custom signature button from the existing \"main\" group\n */\ndiv#wikiEditor-ui-toolbar span[rel=\"signature\"] {\n    display: none;\n}\n</syntaxhighlight>\n\n=== Q & A ===\n'''Question:''' What is the difference to the default signature button?<br>\n'''Answer:''' This custom signature button prepends a space to the signature code in contrast to the code added by the default button, i.e. <code>&thinsp;<nowiki>--~~~~</nowiki></code> instead of <code><nowiki>--~~~~</nowiki></code>. This is helpfull if you would like to add signatures to tables without interfering with the table code itself.\n__NOEDITSECTION__"
                    }
                ]
            },
            "14": {
                "pageid": 14,
                "ns": 0,
                "title": "Test Page",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "[[Hat Beschreibung::Dies ist die Testseite im Hauptnamensraum.]]\n{{#set:\n |Hat Hinweis=Die Annotationen funktionieren nicht.\n}}\n[[Hat weiteren Hinweis::Ob dies klappt?]]\n\n{{#ifanon:I am not logged in and should see this message.|I am logged in and should see this message. }}\n\n<comment-streams />"
                    }
                ]
            }
        }
    }
}