מדיה ויקי:Gadget-browsertab.js: הבדלים בין גרסאות בדף
מראה
אין תקציר עריכה |
אין תקציר עריכה |
||
| שורה 6: | שורה 6: | ||
}; | }; | ||
var api = new mw.Api(); | var api = new mw.Api(); | ||
api.get( params ) | api.get(params) | ||
.done( function ( data ) { | .done(function(data) { | ||
$( document ).prop('title', data.expandtemplates.wikitext); | $(document) | ||
.prop('title', data.expandtemplates.wikitext); | |||
} ); | } ); | ||
// dependencies=mediawiki.api | |||
גרסה מ־03:07, 29 בנובמבר 2021
var params = {
action: "expandtemplates",
text: "{{קיצור מרחב השם|" + mw.config.get('wgPageName').replaceAll('_', ' ') + "}}",
prop: "wikitext",
format: "json"
};
var api = new mw.Api();
api.get(params)
.done(function(data) {
$(document)
.prop('title', data.expandtemplates.wikitext);
} );
// dependencies=mediawiki.api