]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - atom/packages/pretty-json/node_modules/jsonminify/docs/scripts/linenumber.js
Remove easymotion plugin
[rbdr/dotfiles] / atom / packages / pretty-json / node_modules / jsonminify / docs / scripts / linenumber.js
... / ...
CommitLineData
1(function() {
2 var counter = 0;
3 var numbered;
4 var source = document.getElementsByClassName('prettyprint source');
5
6 if (source && source[0]) {
7 source = source[0].getElementsByTagName('code')[0];
8
9 numbered = source.innerHTML.split('\n');
10 numbered = numbered.map(function(item) {
11 counter++;
12 return '<span id="line' + counter + '" class="line"></span>' + item;
13 });
14
15 source.innerHTML = numbered.join('\n');
16 }
17})();