Wikipedia Viewer

Size
2,619 Kb
Views
32,384

How do I make an wikipedia viewer?

What is a wikipedia viewer? How do you make a wikipedia viewer? This script and codes were developed by David Carranza on 09 October 2022, Sunday.

Wikipedia Viewer Previews

Wikipedia Viewer - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia Viewer</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body>
<div class="jumbotron text-center"> <h1>Wikipedia Viewer</h1> <p><a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank"> Feeling lucky? Click on me!</a></p>
</div>
<div class='main text-center'> <div class ='container'> <div class="row"> <div class ='col-md-12'>	<input type="text" class="form-control" id="search" placeholder="Feeling lucky?"> <button type='submit' class='btn btn-submit btn-danger'> Search </button> <a href="https://en.wikipedia.org/wiki/Special:Random"> <ul id='placeHere'> </ul> </div> </div> </div>
</div>
</body> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Wikipedia Viewer - Script Codes CSS Codes

h1 { font-weight: 700px;
}
.container { width: 940px;
}
.btn { float: right; position: relative; bottom: 30px; right: 120px; width: 200px; color: #fff; text-decoration: none;
}
#search { border-radius: 0px; width: 400px; position: relative; left: 30px; box-shadow: 5px 4px 0px -1px rgba(153,144,153,1);
}
body { background: url("https://static.pexels.com/photos/26671/pexels-photo-26671.jpg") no-repeat center center; background-size: cover; color: #fff;
}
.jumbotron { background: transparent; color: #fff; margin-bottom: 20px;
}
.jumbotron a { color: #fff; text-decoration: none;
}
ul { list-style: none; text-align:left; margin-top: 40px; background-color:rgba(192,192,192,0.4); height: 450px; padding-top: 30px; font-size: 16px;
}
.container a { color: #000; text-decoration: none; font-size: 20px;
}

Wikipedia Viewer - Script Codes JS Codes

$(document).ready( function() { $(".btn").on("click",function (){ var search = $("#search").val(); var url= "https://en.wikipedia.org/w/api.php? action=opensearch&search="+search+"&format=json&callback=?"; //mediaWikiAPI $.getJSON(url, function(data){ /* var title = data[1][0]; var content = data[2][0]; var link = data[3][0]; */ $("#placeHere").text(""); for (var i = 0; i < data.length; i++) { $("#placeHere").prepend("<li><a href = "+data[3][i]+">"+data[1][i] +"</a><p> "+data[2][i] +"</p><li>") } });//END OF JSON CALL });//END OF CLICK FUNCTION
}); //END OF DOCUMENT READY
Wikipedia Viewer - Script Codes
Wikipedia Viewer - Script Codes
Home Page Home
Developer David Carranza
Username HotChaiLatte
Uploaded October 09, 2022
Rating 3
Size 2,619 Kb
Views 32,384
Do you need developer help for Wikipedia Viewer?

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!

David Carranza (HotChaiLatte) Script Codes
Create amazing SEO content 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!