Sha256: de0defe40b34843e623dc5c678e8385b66e961e12430654da8098a73b26fdffa

Contents?: true

Size: 802 Bytes

Versions: 76

Compression:

Stored size: 802 Bytes

Contents

(function() {
  var lastReport = null;

  if (!window.Logster) {
    window.Logster = {
      enabled: true
    };
  }

  window.onerror = function(message, url, line, column, errorObj) {
    // never bother reporting more than once a minute
    if (lastReport && new Date() - lastReport < 1000 * 60) {
      return;
    }
    if (!Logster.enabled) {
      return;
    }

    lastReport = new Date();

    var err = {
      message: message,
      url: url,
      line: line,
      column: column,
      window_location: window.location && (window.location + "")
    };

    if (errorObj && errorObj.stack) {
      err.stacktrace = errorObj.stack;
    }

    $.ajax("<%= Logster.config.subdirectory %>" + "/report_js_error", {
      data: err,
      type: "POST",
      cache: false
    });
  };
})();

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
logster-2.10.0 vendor/assets/javascripts/logster.js.erb
logster-2.9.8 vendor/assets/javascripts/logster.js.erb
logster-2.9.7 vendor/assets/javascripts/logster.js.erb
logster-2.9.6 vendor/assets/javascripts/logster.js.erb
logster-2.9.5 vendor/assets/javascripts/logster.js.erb
logster-2.9.4 vendor/assets/javascripts/logster.js.erb
logster-2.9.3 vendor/assets/javascripts/logster.js.erb
logster-2.9.2 vendor/assets/javascripts/logster.js.erb
logster-2.9.1 vendor/assets/javascripts/logster.js.erb
logster-2.9.0 vendor/assets/javascripts/logster.js.erb
logster-2.8.0 vendor/assets/javascripts/logster.js.erb
logster-2.7.1 vendor/assets/javascripts/logster.js.erb
logster-2.7.0 vendor/assets/javascripts/logster.js.erb
logster-2.6.3 vendor/assets/javascripts/logster.js.erb
logster-2.6.2 vendor/assets/javascripts/logster.js.erb
logster-2.6.1 vendor/assets/javascripts/logster.js.erb
logster-2.6.0 vendor/assets/javascripts/logster.js.erb
logster-2.5.1 vendor/assets/javascripts/logster.js.erb
logster-2.5.0 vendor/assets/javascripts/logster.js.erb
logster-2.4.2 vendor/assets/javascripts/logster.js.erb