Mercurial > hg > extraction-interface
comparison geotemco/lib/simile/ajax/scripts/remoteLog.js @ 0:b12c99b7c3f0
commit for previous development
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 19 Jan 2015 17:13:49 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b12c99b7c3f0 |
---|---|
1 /*====================================================================== | |
2 * RemoteLog | |
3 * | |
4 * This is a singleton that permis logging of key-valued data to a | |
5 * remote location. | |
6 *====================================================================== | |
7 */ | |
8 | |
9 SimileAjax.RemoteLog = { | |
10 defaultURL:"http://groups.csail.mit.edu/haystack/facetlog/logger.php", | |
11 url:null, | |
12 logActive: false | |
13 }; | |
14 | |
15 SimileAjax.RemoteLog.possiblyLog = function(vals) { | |
16 if ((SimileAjax.RemoteLog.logActive) && (SimileAjax.RemoteLog.url != null)) { | |
17 vals["url"] = window.location.href; | |
18 try { | |
19 SimileAjax.jQuery.ajax({type:'POST',url:SimileAjax.RemoteLog.url,data:vals}); | |
20 } | |
21 catch (e) {} | |
22 } | |
23 }; | |
24 |