Skip to content

JavaScript API+GUI fetches quotes from Wikiquote and displays them in a fully functioning GUI for drop-in use in your application.

License

Notifications You must be signed in to change notification settings

genolve/wikiquote-api-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wikiquotes-api-gui

JavaScript API+GUI fetches quotes from Wikiquote and displays them in a fully functioning GUI for drop-in use in your application. Try the Standalone Demo or the Fully Integrated Demo- click 'text' then click 'Wikiquote'

Installation

Download the files and add in html header:

<script type="text/javascript" src="wikiquote-api-gui.js"></script>
<link type="text/css" rel="stylesheet" href="wiki-api-gui-styles.css" />

Usage

The GUI interface resides in a DIV in your application and returns the quotes via a callback function you specify on initialization:

	WikiquoteApi =  new WikiquoteApiClass(vpr,$);
	WikiquoteApi.selfConstruct({initsearch:'Einstein',
		waiticon:'<span id="spinner" class="gnlv-blink">working!<span>',
		containerDiv:'#quote-container',
		clickHandler: myhandler
		});

Example callback function:

var myhandler = function(thequote){
			$('#quote-of-day').html(thequote);
			}

Requirements

JQuery is the only requirement, any version above 2.1

Features

  • Intelligently searches Wikiquote, falling back to opensearch if nothing is found
  • Based on search, displays links to related pages
  • Keeps a search history to quickly return to previous pages
  • Filters results to only the most popular quotes

Credit

wikiquotes-api-gui adds a GUI and extensively expands on natetyler's wikiquotes-api.

Contributing

Contributions and feedback welcome! Just drop a note or as usual; fork, make your update, pull request.

About

JavaScript API+GUI fetches quotes from Wikiquote and displays them in a fully functioning GUI for drop-in use in your application.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published