mirror of
https://github.com/Mibew/CanteenHTML5.git
synced 2025-03-13 12:54:09 +03:00
18 lines
482 B
JavaScript
18 lines
482 B
JavaScript
YUI().use('node', function(Y) {
|
|
var code = Y.all('.prettyprint.linenums');
|
|
if (code.size()) {
|
|
code.each(function(c) {
|
|
var lis = c.all('ol li'),
|
|
l = 1;
|
|
lis.each(function(n) {
|
|
n.prepend('<a name="LINENUM_' + l + '"></a>');
|
|
l++;
|
|
});
|
|
});
|
|
var h = location.hash;
|
|
location.hash = '';
|
|
h = h.replace('LINE_', 'LINENUM_');
|
|
location.hash = h;
|
|
}
|
|
});
|