Widget:Map: различия между версиями
Материал из Ролевой сервер "tales.pw"
Xunto (обсуждение | вклад) |
Xunto (обсуждение | вклад) |
||
| Строка 18: | Строка 18: | ||
} | } | ||
| − | + | init(); | |
</script> | </script> | ||
Версия 02:14, 29 июля 2019
<script> var state_map = {};
function init() {
mw.loader.using( 'mediawiki.api', function () {
(new mw.Api()).get( {
action: 'ask',
query: '+|?карта|?Display title of'
}).done(function(data) {
console.log(data)
var results = Object.values(data["query"]["results"]);
for (var i=0; i<results.length; i++) {
console.log(results[i]);
}
});
});
}
init(); </script>