Widget:Refresh : Différence entre versions

Ligne 2 : Ligne 2 :
 
   setTimeout(function(){
 
   setTimeout(function(){
 
     window.location.reload(1);
 
     window.location.reload(1);
 +
 
   }, 300000);
 
   }, 300000);
 +
 +
var api = new mw.Api();
 +
api.get( {
 +
    action: 'expandtemplates',
 +
    text: '{{#invoke:liste7}}'
 +
} ).done ( function ( data ) {
 +
    alert(data.expandtemplates['*']);
 +
} );
 +
 
</script>
 
</script>

Version du 1 juillet 2019 à 10:24

<script type="text/javascript">

  setTimeout(function(){
    window.location.reload(1);
  }, 300000);

var api = new mw.Api(); api.get( {

   action: 'expandtemplates',
   text: 'Erreur de script : vous devez spécifier une fonction à appeler.'

} ).done ( function ( data ) {

   alert(data.expandtemplates['*']);

} );

</script>