Wikipedia Viewer
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 Codoer on 07 December 2022, Wednesday.
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 prefetch' href='https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid " > <div class="row text-center aligeneral"> <div class="wiki-area"> <h1>Wikipedia Viewer</h1> <form id="form-container">
<div class="input-group"> <input class="form-control" type="search" id="wikiSearch" value="" placeholder="Search..."> <span class="input-group-addon" class="form-control-feedback"> <i class="fa fa-search"></i></span> </div> <a href="https://en.wikipedia.org/wiki/Special:Random" class="btn btn-primary" target="_black">Random Wikipedia</a> </form> <div id="wikiContent"> </div> </div> </div> </div> <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
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button;}
body
{ background-color:#008299;
background-size: cover;
height: 2000px;
}
#wikiDiv{ width: 1150px;
background-color:lightgray;
margin-top: 40px;
margin-left: auto; margin-right: auto;
padding-top: 1px;
padding-left: 20px;
padding-right: 10px;
color:black;
padding-bottom: 5px;
border-radius: 10px;
text-align:left;
}
h1{ font-size: 60px; font-weight: bold; color: white; margin: 50px 0;
}
.btn-primary{ margin-top: 40px;
}
#wikiTitle{ color:darkcyan;
}
input[type=search]{
width: 10%;
border-radius: 4px; font-size: 20px;
}
form { width: 20%; margin: auto;
}
Wikipedia Viewer - Script Codes JS Codes
function wiki(data) { var obj=data.query.pages; var HTMLnodes = ""; // build up the results $.map(obj,function(v,i){ HTMLnodes += "<div id='wikiDiv'><a href='https://en.wikipedia.org/wiki/" +v.title+"' target='_blank'><h2 id='wikiTitle'>"+v.title+ "</h2>"+"</a><h4 id='wikiExtract'>" +v.extract+"</h4></div>" }); //remove old search results $("#wikiContent").empty(); //add new results $("#wikiContent").append(HTMLnodes); }
//function pre(event){ event.preventDefault(); }
function loadData() { var wikiUrl="https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=extracts&exintro&explaintext&exsentences=1&exlimit=max&callback=?&gsrsearch=" var value=$("input").val(); $.getJSON(wikiUrl+value, wiki); //pre(event);
}
$("#wikiSearch").on("input",loadData);//when type letter, then shows search result same time;//replace oninput="loadData()"in input tag;
$("#form-container").on("submit",function(e){// replace pre(e); function pre(e){e.preventDefault();}; console.log(e) e.preventDefault();//replace onsubmit="return false" in form tag; //loadData();
})
Developer | Codoer |
Username | c0d0er |
Uploaded | December 07, 2022 |
Rating | 3 |
Size | 2,811 Kb |
Views | 8,096 |
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!
Name | Size |
Imposssible Tic Tac Toe | 5,508 Kb |
Random Quote Machine | 2,411 Kb |
Twitch TV App | 3,530 Kb |
Perseverance Portfolio | 2,756 Kb |
Visualize National Contiguity with a Force Directed Graph | 5,906 Kb |
Jd wiki | 3,082 Kb |
Show the Local Weather | 2,904 Kb |
React Recipe Box | 8,637 Kb |
React photo carousel | 2,500 Kb |
React Camper Leaderboard | 5,258 Kb |
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!
Name | Username | Size |
03 - CSS Variables | Run-time | 2,682 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
Simple canvas drawing -- simplified lines | Anandthakker | 3,127 Kb |
Midterm dry run | Jds317 | 1,649 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Text Looping Transition | Agelber | 5,619 Kb |
Incremental game | Eprouver | 5,868 Kb |
A Pen by Alexandru Pora | Axpro | 1,615 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!