Skip to content

Instantly share code, notes, and snippets.

@nichtich
nichtich / wiktionarylookup.html
Created November 12, 2010 19:10
Look up a word in Wiktionary via MediaWiki API and show the Wiktionary page
<html>
<head>
<script type="text/javascript" src="./jquery-1.4.3.min.js"></script>
<script type="text/javascript">
var baseURL = 'http://en.wiktionary.org';
function showPage(page,text) {
var sourceurl = baseURL + '/wiki/' + page;
$('#pagetitle').text(page);
$('#wikiInfo').html(text);
$('#sourceurl').attr('href',sourceurl);