~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/d3/index.js

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
var self = this,
2
 
    globals = ["document", "window", "navigator", "CSSStyleDeclaration", "d3"],
3
 
    globalValues = {};
4
 
 
5
 
globals.forEach(function(global) {
6
 
  if (global in self) globalValues[global] = self[global];
7
 
});
8
 
 
9
 
document = require("jsdom").jsdom("<html><head></head><body></body></html>");
10
 
window = document.createWindow();
11
 
navigator = window.navigator;
12
 
CSSStyleDeclaration = window.CSSStyleDeclaration;
13
 
 
14
 
require("./d3.v2");
15
 
 
16
 
module.exports = d3;
17
 
 
18
 
globals.forEach(function(global) {
19
 
  if (global in globalValues) self[global] = globalValues[global];
20
 
  else delete self[global];
21
 
});