Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

comments

  • Loading branch information...
commit 76441a7bd2f988d6f7c04271086031e748a14bb0 1 parent 9963626
Check your git settings! authored December 26, 2012
20  src/contentscript.js
@@ -8,33 +8,25 @@ function $(s){
8 8
   return document.querySelectorAll(s);
9 9
 }
10 10
 
11  
-function prepend(child){
12  
-  this.insertBefore(child, this.firstChild);
13  
-}
14  
-
15  
-
16 11
 var tt = document.createElement('div');
17 12
 tt.className = "graph-tooltip";
18 13
 document.body.appendChild(tt);
19 14
 
20  
-
21 15
 function over(){
22  
-  var parent = this;
23  
-  var img = parent.getElementsByTagName('img')[0];
24  
-  var rect = parent.getBoundingClientRect();
  16
+  var td = this;
  17
+  var img = td.getElementsByTagName('img')[0];
  18
+  var rect = td.getBoundingClientRect();
25 19
   tt.innerText = img.alt;
26 20
   tt.style.display = "block";
27 21
   tt.style.top = window.scrollY + rect.top - rect.height - 28 + 'px';  // 30 is the height of the tooltip
28 22
   tt.style.left = window.scrollX + rect.left + (rect.width/2) - 100 + 'px'; // 100 is half of the width of the tooltip
29  
-  // console.log(window.scrollY + rect.top - rect.height - 30, window.scrollX + rect.left - rect.width);
30 23
 }
31 24
 
32 25
 function out(){
33 26
   tt.style.display = "none";
34 27
 }
35 28
 
36  
-[].forEach.call($('table.tt_graph img'), function(el){
37  
-  var parent = el.parentNode;
38  
-  parent.onmouseover = over;
39  
-  parent.onmouseout = out;
  29
+[].forEach.call($('table.tt_graph td'), function(td){
  30
+  td.onmouseover = over;
  31
+  td.onmouseout = out;
40 32
 });
3  src/contentstyle.css
... ...
@@ -1,5 +1,7 @@
  1
+
1 2
 .alertHeader { display: none; }
2 3
 
  4
+/* make these twice as tall, easier to mouse-over (jira-defined height is 4px for these) */
3 5
 table.tt_graph,
4 6
 table.tt_graph td,
5 7
 table.tt_graph img { height:8px !important; font-size: 8px/8px arial; }
@@ -19,6 +21,7 @@ table.tt_graph img { display:block; }
19 21
 	left:0;
20 22
 }
21 23
 
  24
+/* down-pointing triangle */
22 25
 .graph-tooltip:after{
23 26
 	content:" ";
24 27
 	display: block;

0 notes on commit 76441a7

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