Difference between revisions of "Main Page"

From Networks of Care
Jump to navigation Jump to search
 
(83 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
<html>
+
{{#css:
<head>
 
</head>
 
  
<body>
+
#content{
 +
margin-left: 0;
 +
padding: 0;
 +
}
  
  
<script>
+
h1{
 +
display: none;
 +
}
  
var apiEndpoint = "https://en.wikipedia.org/w/api.php";
+
.mw-body-content p {
var params = "action=query&list=random&rnlimit=3&format=json";
+
max-width: 100%;
 +
position: fixed;
 +
width: 100%;
 +
height: 100%;
 +
left: 0;
 +
top: 0;
 +
display: block;
 +
margin-top: 0;
 +
}
 +
}}
  
/**
+
<html>
* The function to wrap the result
+
<head>
*/
+
  <base target="_parent">
var callback = function (response) {
+
</head>
    var pages = response.query.random; // Process the output to get the titles
+
<body>
    Object.keys(pages).forEach(function(key) {
+
<iframe src="https://hub.xpub.nl/networksofcare/map.htm" height="100%" width="100%" frameBorder="0"></iframe>
        console.log(pages[key].title);
 
    });
 
};
 
 
 
var scriptTag = document.createElement("script"); // Dynamically create a "script" tag
 
scriptTag.src = apiEndpoint + "?" + params + "&callback=callback"; // Point to the query string
 
 
 
document.body.appendChild(scriptTag); // Add the script tag to the document
 
</script>
 
 
</body>
 
</body>
 
</html>
 
</html>

Latest revision as of 14:44, 5 June 2020