Wikipedia Viewer
How do I make an wikipedia viewer?
Just type in your search.. What is a wikipedia viewer? How do you make a wikipedia viewer? This script and codes were developed by Kartikeya Gupta on 22 November 2022, Tuesday.
Wikipedia Viewer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia Viewer</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html lang="en">
<head> <meta charset="UFT-8"> <title>Wikipedia Viewer</title>
</head>
<body>
<div class='container-fluid'> <div class='row'> <div class='col-md-12'><h1><i class="fa fa-wikipedia-w fa-2x" aria-hidden="true"></i>ikipedia Viewer</h1></div> <div class='col-md-6 col-md-offset-3'> <input type="text" id="search_data" placeholder=" Search" style="font-family:Arial, FontAwesome" /> <h3 class='hovertext'><i class="fa fa-random" aria-hidden="true"></i></i> Click <a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">here</a> for a random search of articles.</h3> </div> </div> <div class='row'> <div class='col-md-6 col-md-offset-3'> <div id='content'></div> </div> </div> <h5>Design and Coded my <a href="https://www.facebook.com/kartikeya100" target=_blank>Kartikeya Gupta</a></h5>
</div>
</body>
</html> <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Wikipedia Viewer - Script Codes CSS Codes
@import 'https://fonts.googleapis.com/css?family=Lobster|Russo+One|Slabo+27px';
body,html{ height: 100%;
}
h1,h2,h3,h5{ text-align: center;
}
h4{ text-align: center; font-family: 'Russo One', sans-serif; font-size: 22px; padding: 0; margin: 0;
}
h5{ margin-bottom: 60px;
}
input[type="text"] { font-size:25px; text-decoration: none; border-radius: 5px; margin: 0 auto; border: 2px solid black; width: 100%;
}
input[type="text"]:focus{ background-color: #F8FBF8; box-shadow: #9CB5DE 4px 4px; border: 0.5px solid black;
}
input:focus::-webkit-input-placeholder { color:transparent; }
input:focus:-moz-placeholder { color:transparent; } /* FF 4-18 */
input:focus::-moz-placeholder { color:transparent; } /* FF 19+ */
input:focus:-ms-input-placeholder { color:transparent; } /* IE 10+ */
p{ margin-bottom: 90px; font-size: 17px; line-height: 22px; font-family: 'Slabo 27px', serif;
}
Wikipedia Viewer - Script Codes JS Codes
$(document).ready(function() {
var search_data;
var result = [];
var pages;
$('#search_data').keyup(function() {
$("#content").empty();
search_data = $('#search_data').val() search(search_data);
})
function search(sdata) { $.ajax({ crossOrigin: true, url: "https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch="+sdata, dataType: 'jsonp', type: 'GET', headers:{'Api-User-Agent': 'Example/1.0'}, success: function(data) { pages = data.query.pages; console.log(result); for (var x in pages) { displayData(pages[x].pageid, pages[x].title, pages[x].extract); //<------ calls the function each loop iteration and display/append data on page
} //for loop
} //success function
}); timeout: 2000 //ajax
} //search function
function displayData(pageid, title, desc){ var pID = pageid; var htmlStr = '<a href="http://en.wikipedia.org/wiki?curid='+pID+'" target="_blank"><h4>'+title+'</h4></a><p>'+desc+'</p>'; $('#content').toggleClass('fadeIn'); $('#content').append(htmlStr);
}
}); //final braces
Developer | Kartikeya Gupta |
Username | kartikeya100 |
Uploaded | November 22, 2022 |
Rating | 3 |
Size | 3,055 Kb |
Views | 14,168 |
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 |
My Portfolio | 5,127 Kb |
Portfolio 2 | 4,341 Kb |
Random Quote Generator Machine | 3,011 Kb |
Tribute Page | 3,799 Kb |
Pomodoro clock | 2,825 Kb |
Javascript Calculator | 2,701 Kb |
Weather Application | 2,720 Kb |
Twitch TV | 3,103 Kb |
Parallax effect | 2,849 Kb |
Tic Tac Toe | 3,593 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 |
Hmmm... | Rk007 | 4,848 Kb |
Off Canvas | Mariamarica | 1,870 Kb |
Blockquote design | Sjmcpherson | 1,863 Kb |
Reading Grid | Tappily | 4,306 Kb |
Typefaces with descriptions | Megandoty | 2,944 Kb |
Replace url via jquery | Serluk | 1,429 Kb |
Highbrow Basic HTML Lesson 7 | Kimlarocca | 1,662 Kb |
Background Images | Jooonebug | 2,100 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 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!