MediaWiki:Timeless.js: mudanças entre as edições
De RubinOT Wiki
Sem resumo de edição |
Sem resumo de edição |
||
Linha 1: | Linha 1: | ||
mw.loader.using('jquery', function() { | mw.loader.using('jquery', function() { | ||
$(document).ready(fetchData); | $(document).ready(function() { | ||
console.log('Document is ready, calling fetchData...'); | |||
fetchData(); | |||
}); | |||
}); | }); | ||
function fetchData() { | function fetchData() { | ||
console.log('fetchData function called'); | |||
var url = 'https://rubinot.com.br/webservices/worlds.php'; | var url = 'https://rubinot.com.br/webservices/worlds.php'; | ||
$.ajax({ | |||
url: url, | |||
method: 'GET', | |||
dataType: 'json', | |||
success: function(data) { | |||
console.log(data); // Exibe o conteúdo no console | console.log(data); // Exibe o conteúdo no console | ||
} | }, | ||
error: function(jqXHR, textStatus, errorThrown) { | |||
console.error('There has been a problem with your fetch operation:', | console.error('There has been a problem with your fetch operation:', textStatus, errorThrown); | ||
}); | } | ||
}); | |||
} | } | ||
Edição das 17h30min de 17 de maio de 2024
mw.loader.using('jquery', function() { $(document).ready(function() { console.log('Document is ready, calling fetchData...'); fetchData(); }); }); function fetchData() { console.log('fetchData function called'); var url = 'https://rubinot.com.br/webservices/worlds.php'; $.ajax({ url: url, method: 'GET', dataType: 'json', success: function(data) { console.log(data); // Exibe o conteúdo no console }, error: function(jqXHR, textStatus, errorThrown) { console.error('There has been a problem with your fetch operation:', textStatus, errorThrown); } }); }