diff --git a/data/js/tomahawk.js b/data/js/tomahawk.js index d4553112a..1dd76e6e8 100644 --- a/data/js/tomahawk.js +++ b/data/js/tomahawk.js @@ -18,26 +18,20 @@ */ // if run in phantomjs add fake Tomahawk environment -if(window.Tomahawk === undefined) -{ -// alert("PHANTOMJS ENVIRONMENT"); +if (window.Tomahawk === undefined) { var Tomahawk = { - fakeEnv: function() - { + fakeEnv: function () { return true; }, - resolverData: function() - { + resolverData: function () { return { - scriptPath: function() - { + scriptPath: function () { return "/home/tomahawk/resolver.js"; } }; }, - log: function( message ) - { - console.log( message ); + log: function (message) { + console.log(message); } }; } @@ -47,30 +41,28 @@ Tomahawk.resolver = { scriptPath: Tomahawk.resolverData().scriptPath }; -Tomahawk.timestamp = function() { - return Math.round( new Date()/1000 ); +Tomahawk.timestamp = function () { + return Math.round(new Date() / 1000); }; -Tomahawk.dumpResult = function( result ) { - var results = result.results; +Tomahawk.dumpResult = function (result) { + var results = result.results, + i = 0; Tomahawk.log("Dumping " + results.length + " results for query " + result.qid + "..."); - for(var i=0; i