Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$(document).ready(function() {
$("#search").click(function() {
var searchString = document.getElementById('searchbar').value;
var filteredSearch = searchString.replace(" ", "%20");
var address = "*&titles=" + filteredSearch + "&prop=revisions&rvprop=content&format=json&callback=?";
$.getJSON(address, function(json) {
console.log("Ok! I am running!");
var articleName = json.title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.