Widget:Map: различия между версиями
Материал из Ролевой сервер "tales.pw"
Xunto (обсуждение | вклад) |
Xunto (обсуждение | вклад) |
||
| Строка 17: | Строка 17: | ||
} | } | ||
| − | + | document.ready = init; | |
</script> | </script> | ||
Версия 02:11, 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) {
var results = Object.values(data["query"]["results"]);
for (var i=0; i<results.length; i++) {
console.log(results[i]);
}
});
});
}
document.ready = init; </script>