WikipediaViewer

Developer
Size
2,383 Kb
Views
22,264

How do I make an wikipediaviewer?

What is a wikipediaviewer? How do you make a wikipediaviewer? This script and codes were developed by Hong on 21 October 2022, Friday.

WikipediaViewer Previews

WikipediaViewer - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>WikipediaViewer</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid"> <div class="text-center title"> <h2>Wikipedia Viewer</h2> </div> <div style="text-align:center;" class="random"> <a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank"><button type="button" class="btn"><h3>Click here for a random article</h3></button></a> <div> <input id="input1" type="text" placeholder="Click here to search"> </div> <br> <div class="result1"></div> </div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

WikipediaViewer - Script Codes CSS Codes

body { background-color: #8FBC8F;
}
.title { position: relative; top: 60px;
}
.random { position: relative; top: 120px;
}
input { height: 60px; width: 348px; font-size: 24px;
}
.entry { background-color: #ddd; padding: 10px 20px; border-radius: 20px;
}

WikipediaViewer - Script Codes JS Codes

$(document).ready(function() { $("#input1").keypress(function(event) { console.log(event); if (event.keyCode == 13) { $(".title").removeClass("title"); $(".random").removeClass("random"); $.getJSON("https://www.crossorigin.me/https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=" + $("#input1").val(), function(json) { var html = ""; var a={}; var b=0; json.query.search.forEach(function(val) { $.getJSON("https://www.crossorigin.me/https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&&exsentences=1&titles=" + val.title, function(json) { a=json.query.pages; b=Object.keys(a)[0]; html += '<div style="text-align:left;" class="entry"><a href="https://en.wikipedia.org/?curid=' + b + '" target="_blank">' + '<h4>' + a[b].title + "</h4>" + a[b].extract + "</a></div><br>"; $(".result1").html(html); }); // Now a different json }); }); }; });
});
WikipediaViewer - Script Codes
WikipediaViewer - Script Codes
Home Page Home
Developer Hong
Username designbuildshipsoftware
Uploaded October 21, 2022
Rating 3
Size 2,383 Kb
Views 22,264
Do you need developer help for WikipediaViewer?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Hong (designbuildshipsoftware) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!