~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/api/assets/js/yui-prettify.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
 
YUI().use('node', function(Y) {
2
 
    var code = Y.all('.prettyprint.linenums');
3
 
    if (code.size()) {
4
 
        code.each(function(c) {
5
 
            var lis = c.all('ol li'),
6
 
                l = 1;
7
 
            lis.each(function(n) {
8
 
                n.prepend('<a name="LINENUM_' + l + '"></a>');
9
 
                l++;
10
 
            });
11
 
        });
12
 
        var h = location.hash;
13
 
        location.hash = '';
14
 
        h = h.replace('LINE_', 'LINENUM_');
15
 
        location.hash = h;
16
 
    }
17
 
});