1 // Defines common variables for testing
3 // $$$ TODO make test host auto-magic
5 testHost: 'http://www-testflip.archive.org'
6 //testHost: 'http://www-mang.archive.org'
9 // Set up dummy BookReader class for JSLocate
10 function BookReader() {
13 BookReader.prototype.init = function() {
18 // Returns locator URL for the given id
19 function jsLocateURL(identifier, book) {
20 var bookURL = common.testHost + '/bookreader/BookReaderJSLocate.php?id=' + identifier;
22 bookURL += '&book=' + book;
27 function previewURL(identifier, subPrefix, page) {
28 var imageURL = common.testHost + '/download/' + identifier;
29 var bookPrefix = identifier;
31 imageURL += '/' + subPrefix;
32 var subPrefixParts = subPrefix.split('/')
33 bookPrefix = subPrefixParts[subPrefixParts.length - 1];
35 imageURL += '/page/' + bookPrefix + '_' + page + '.jpg';