aboutsummaryrefslogtreecommitdiff
path: root/node_modules/mocha/lib/reporters/templates/script.html
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
commitdc46b87abee1e441c07524ddde67fd902a919336 (patch)
tree13eba08b8655dfd78e9600ec5f612011a0bf3b35 /node_modules/mocha/lib/reporters/templates/script.html
parent26f4b38e9e5a202756a7c33abc775aea2617aeaf (diff)
added some dependencies to package.json
Diffstat (limited to 'node_modules/mocha/lib/reporters/templates/script.html')
-rw-r--r--node_modules/mocha/lib/reporters/templates/script.html34
1 files changed, 0 insertions, 34 deletions
diff --git a/node_modules/mocha/lib/reporters/templates/script.html b/node_modules/mocha/lib/reporters/templates/script.html
deleted file mode 100644
index 073cf79..0000000
--- a/node_modules/mocha/lib/reporters/templates/script.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<script>
-
-headings = [];
-
-onload = function(){
- headings = document.querySelectorAll('h2');
-};
-
-onscroll = function(e){
- var heading = find(window.scrollY);
- if (!heading) return;
- var links = document.querySelectorAll('#menu a')
- , link;
-
- for (var i = 0, len = links.length; i < len; ++i) {
- link = links[i];
- link.className = link.getAttribute('href') == '#' + heading.id
- ? 'active'
- : '';
- }
-};
-
-function find(y) {
- var i = headings.length
- , heading;
-
- while (i--) {
- heading = headings[i];
- if (y >= heading.offsetTop) {
- return heading;
- }
- }
-}
-</script>