PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/ajax/scripts/remoteLog.js

http://showslow.googlecode.com/
JavaScript | 24 lines | 14 code | 3 blank | 7 comment | 3 complexity | 3931cd326365ccd3d39d76509a7fbb37 MD5 | raw file
  1. /*======================================================================
  2. * RemoteLog
  3. *
  4. * This is a singleton that permis logging of key-valued data to a
  5. * remote location.
  6. *======================================================================
  7. */
  8. SimileAjax.RemoteLog = {
  9. defaultURL:"http://groups.csail.mit.edu/haystack/facetlog/logger.php",
  10. url:null,
  11. logActive: false
  12. };
  13. SimileAjax.RemoteLog.possiblyLog = function(vals) {
  14. if ((SimileAjax.RemoteLog.logActive) && (SimileAjax.RemoteLog.url != null)) {
  15. vals["url"] = window.location.href;
  16. try {
  17. SimileAjax.jQuery.ajax({type:'POST',url:SimileAjax.RemoteLog.url,data:vals});
  18. }
  19. catch (e) {}
  20. }
  21. };