This example shows how to get the Wikipedia content via the MediaWiki action API using jQuery. The output data in JSONP format contains several information such as page id, page title and extract which are parsed and used to form a list which user can click to open the corresponding Wikipedia page. It also makes use of Special:Random to randomly bring user to a random page.
Sample page can be found at https://codepen.io/lengieng/full/VaWjYQ/
This example requires the following libraries:
Author: Lengieng Ing ([email protected])
This software is distributed under the MIT license. Please see the attached file called LICENSE.txt.