From: Mike Taylor Date: Mon, 13 Oct 2014 16:02:20 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/mkws X-Git-Tag: 1.0.0~237 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=b4b95c58a3227fc09ab9b8694e0187873019bd01;hp=a389618ea922160f7b74274dfa521387fa6055da;p=mkws-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/mkws --- diff --git a/doc/mkws-manual.markdown b/doc/mkws-manual.markdown index ac8ea6f..c1290b3 100644 --- a/doc/mkws-manual.markdown +++ b/doc/mkws-manual.markdown @@ -62,12 +62,11 @@ The following is a complete MKWS-based searching application: -Go ahead, try it! You don't even need a web-server. Just copy and -paste this HTML into a file on your computer -- `/tmp/magic.html`, -say -- and point your web-browser at it: -`file:///tmp/magic.html`. Just like that, you have working -metasearching. - +Go ahead, try it! Simply put the above in a file (e.g index.html), +drop it into a folder accessible with an ordinary web-server (e.g Apache) +and load it in your web browser (and no, usually, you can't just load the file +directly from disk as some browsers, e.g Chrome, won't allow storing cookies). +Just like that, you have working metasearching. How the example works --------------------- diff --git a/src/mkws-widget-main.templates/Ranking.handlebars b/src/mkws-widget-main.templates/Ranking.handlebars index b651957..1c823bb 100644 --- a/src/mkws-widget-main.templates/Ranking.handlebars +++ b/src/mkws-widget-main.templates/Ranking.handlebars @@ -36,7 +36,7 @@ perPage {{/if}} {{/each}} - {{{mkws-translate "per page."}}} + {{{mkws-translate "per page"}}} {{~/if~}} diff --git a/test/phantom/screenshot.js b/test/phantom/screenshot.js index 40f9937..5bec386 100644 --- a/test/phantom/screenshot.js +++ b/test/phantom/screenshot.js @@ -5,11 +5,23 @@ var url = system.args[1] || 'http://www.indexdata.com/'; var file_png = system.args[2] || 'indexdata.png'; var timeout = system.args[5] ? system.args[5] : 0.2; -if (system.args.length === 1) { - console.log('Usage: screenshot.js '); +function usage (message) { + if (message) { + console.log(message + "\n"); + } + console.log('Usage: screenshot.js '); phantom.exit(); } +if (system.args.length === 1) { + usage(); +} + +if (!file_png.match(/\.png$/)) { + usage("File name has no .png extension: '" + file_png + "'"); +} + + // page.zoomFactor = 1.0; page.viewportSize = { width: system.args[3] ? system.args[3] : 1200, @@ -28,3 +40,5 @@ page.open(url, function () { phantom.exit(); }, timeout * 1000); }); + +// EOF