public
Description: One off scripts, small plugins etc which I find useful.
Clone URL: git://github.com/simonjefford/tinyprojects.git
Search Repo:
Added railslighthouselinker.js

A greasemonkey script for adding links between commit messages on github 
and lighthouse.
simonjefford (author)
Mon May 12 12:16:59 -0700 2008
commit  5a77f34d8888af462d2c7b7b53e634da1920a1e3
tree    15918ff7e96fb3900e2d7c92fad34085c76f3f7a
parent  354b4e9ac2fc6f1174f5c1f16b02fe78b7bfcf91
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -1 +1,17 @@
0
+// ==UserScript==
0
+// @name Rails Lighthouse Linker
0
+// @namespace http://sjjdev.com/lighthouselinker
0
+// @include http://github.com/*/rails/commit/*
0
+// ==/UserScript==
0
+
0
+var pre = document.getElementsByClassName("message")[0].childNodes[0];
0
+if (pre)
0
+{
0
+ var norm = pre.innerHTML.replace('\n', '')
0
+ var results = norm.match(/\[#([0-9]+).*\]/);
0
+ if (results)
0
+ {
0
+ pre.innerHTML = norm.replace(results[0], '\n<a href="http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/' + results[1] + '">' + results[0] + '</a>\n\n')
0
+ }
0
+}

Comments

    No one has commented yet.