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.
JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
index.htm
wiki-api-gui-styles.css
wikiquote-api-gui.js

README.md

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.

You can’t perform that action at this time.