The MasterKey Widget Set provides the easiest possible way to enhance an existing web-site with customised searching across multiple sources, ranking and merging the results.
As much of the searching functionality as possible is hosted on http://mkws.indexdata.com/
so that very simple applications such as https://example.indexdata.com/simple.html
can have MasterKey searching with minimal effort. All you need to do is pull in our JavaScript and optional stylesheet, then add <div>
s to your page that have special class
attributes. We do the rest.
Any modern browser will work fine. JavaScript must be enabled.
Not supported: IE6, IE7
Here is a completely functional (though ugly) MKWS-based searching application [link]
<script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
<div class="mkwsSearch"></div>
<div class="mkwsResults"></div>
That's it. A complete metasearching application. Everything else is refinement.
The application's HTML must contain the following elements, as well as whatever makes up the application itself:
<script type="text/javascript" src="http://mkws.indexdata.com/mkws-complete.js"></script>
<link rel="stylesheet" href="http://mkws.indexdata.com/mkws.css" />
These lines pull in JavaScript code and the default styles. (The latter may be omitted or replaced with application-specific styles for the widgets.)
Then the following special <div>
s can be added (with no content), and will be filled in by MKWS:
<div class="mkwsSearch"></div>
-- search box and button<div class="mkwsResults"></div>
-- result list, including pager/sorting<div class="mkwsStat"></div>
-- summary statistics<div class="mkwsSwitch"></div>
-- switch between record and target views<div class="mkwsTargets"></div>
-- target list, including status<div class="mkwsLang"></div>
-- switch between languages, e.g. English, Danish and GermanYou can configure and control the client by creating an mkws_config
object. Here is an example showing how to use options to offer a choice between English and German UI languages, and to default to sorting by title ascending:
<script type="text/javascript">
var mkws_config = {
lang_options: [ "en", "de" ],
sort_default: "title:1"
};
</script>
Apart from this file and its PDF version:
The source code for MKWS is available on GitHub.
It is furnished under the GNU Lesser General Public License v3.0.
Here are the files that this web-site provides:
Minified versions of the MKWS JavaScript files are also available:
The links above to the various forms of the widget-set JavaScript (mkws.js, mkws-complete.js, mkws.min.js and mkws-complete.min.js) together with the CSS file (mkws.css) are always to the current versions of those files. Applications that rely on a particular version can instead use the specific numbered versions in the releases area, for example releases/mkws-0.9.1.js. and releases/mkws-0.9.1.css.
The current version number is always in the VERSION file.
Version history is in the NEWS file.
It's worth viewing the source of these to see how small they are and how various things are done.
http://example.indexdata.com/simple.html
#mkwsResults
division, allowing it to use a rather different layout.MKWS comes pre-configured to search in a set of a dozen or so open-access targets, as a proof of concept. But you'll want to use it to search your own selection of targets -- some open access, some subscription.
We can set that up for you: email us on .
Copyright (C) 2013-2016 Index Data ApS. http://indexdata.com