Changes

Jump to navigation Jump to search
13 bytes removed ,  06:29, 13 June 2021
no edit summary
Line 68: Line 68:  
         var random = randoms[0].title;
 
         var random = randoms[0].title;
 
          
 
          
const params = {
+
        var randomString = "<a href='http://lifeafterbob.wiki/view/"+randoms[0].title+"'>"+randoms[0].title+"</a>"
 +
        $("#randompage").append(randomString);
 +
 
 +
var contentparams = {
 
action: 'parse',
 
action: 'parse',
 
page: randoms[0].title,
 
page: randoms[0].title,
 
format: 'json'
 
format: 'json'
 
};
 
};
const api = new mw.Api();
     −
api.get(params).done(data => {
+
 
 +
api.get(contentparams).done(data => {
 
console.log(data.parse.text['*']);
 
console.log(data.parse.text['*']);
 
});
 
});
        var randomString = "<a href='http://lifeafterbob.wiki/view/"+randoms[0].title+"'>"+randoms[0].title+"</a>"
  −
        $("#randompage").append(randomString);
  −
      
} );
 
} );

Navigation menu