Skip to content
Browse files

Kill graph drawing stuff for now.

  • Loading branch information...
1 parent f21ff0a commit 40b9b53b37a45b88b97e47f739cc2dd8be8fb42b Geoff Greer committed Oct 16, 2011
Showing with 7 additions and 9 deletions.
  1. +0 −2 draw.js
  2. +1 −4 popup.html
  3. +6 −3 popup.js
View
2 draw.js
@@ -1,6 +1,4 @@
// Utils for drawing lines and graphs and stuff
-var g = new Graph();
-
function draw_line(visit_id, referrer_id) {
visit_div = $("#visit_" + visit_id);
referrer_div = $("#visit_" + referrer_id);
View
5 popup.html
@@ -45,12 +45,9 @@
<a href="${url}"><img src="chrome://favicon/${url}">${title}<br/>${url}</a>
at ${visit_time.toLocaleString()} visit ${visit.visitId}
from <a href="${referrer_url}">
- <img src="chrome://favicon/${referrer_url}">${referrer_url}</a> ${visit.transition}
+ <img src="chrome://favicon/${referrer_url}">${referrer_url}</a> ${visit.transition} visit ${referrer_visit}
</div>
</script>
-<script type="text/javascript" src="graph/raphael-min.js"> </script>
-<script type="text/javascript" src="graph/dracula_graffle.js"> </script>
-<script type="text/javascript" src="graph/dracula_graph.js"> </script>
<script type="text/javascript" src="draw.js">
</script>
<script type="text/javascript" src="popup.js">
View
9 popup.js
@@ -25,12 +25,13 @@ function display_visit(visit, depth, parent) {
var result = {
visit: visit,
url: url,
+ referrer_visit: visit.referringVisitId,
referrer_url: referrer_url,
depth: depth,
visit_time: visit_date
};
- visit_div = $("#visit_" + visit.visitId);
+ var visit_div = $("#visit_" + visit.visitId);
if (visit_div.length === 0) {
$("#visit_template_default").tmpl(result).appendTo("#history_container");
}
@@ -43,7 +44,7 @@ function display_visit(visit, depth, parent) {
var referrer_visit = history_visits[visit.referringVisitId];
if (referrer_visit) {
display_visit(referrer_visit, depth+1, visit);
- draw_line(visit.visitId, visit.referringVisitId);
+// draw_line(visit.visitId, visit.referringVisitId);
}
else {
console.log("visit id " + visit.referringVisitId + " references no visit");
@@ -60,10 +61,12 @@ function display_visits(visits) {
display_visit(visits[i]);
}
$("#history_container").append("<hr />");
+/*
var layouter = new Graph.Layout.Spring(g);
layouter.layout();
var renderer = new Graph.Renderer.Raphael('canvas', g, 500, 1000);
renderer.draw();
+*/
}
function set_history(url) {
@@ -99,5 +102,5 @@ function get_history_since(time) {
}
var now = new Date();
-var last_month = now.getTime() - (1000 * 60 * 60 * 24 * 30);
+var last_month = now.getTime() - (1000 * 60 * 60 * 24 * 30); // 30 days
get_history_since(last_month);

0 comments on commit 40b9b53

Please sign in to comment.
Something went wrong with that request. Please try again.