PageSourceSearch

https://hpo-japan.com/js/dropdown.js

js hpo-japan.com collected 2026-10-07 15:44:41 UTC 1,625 bytes, 59 lines download raw bytes

1var DDSPEED = 10;
2var DDTIMER = 15;
3
4// main function to handle the mouse events //
5function ddMenu(id,d){
6  var h = document.getElementById(id + '-ddheader');
7  var c = document.getElementById(id + '-ddcontent');
8  clearInterval(c.timer);
9  if(d == 1){
10    clearTimeout(h.timer);
11    if(c.maxh && c.maxh <= c.offsetHeight){return}
12    else if(!c.maxh){
13      c.style.display = 'block';
14      c.style.height = 'auto';
15      c.maxh = c.offsetHeight;
16      c.style.height = '0px';
17    }
18    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
19  }else{
20    h.timer = setTimeout(function(){ddCollapse(c)},50);
21  }
22}
23
24// collapse the menu //
25function ddCollapse(c){
26  c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
27}
28
29// cancel the collapse if a user rolls over the dropdown //
30function cancelHide(id){
31  var h = document.getElementById(id + '-ddheader');
32  var c = document.getElementById(id + '-ddcontent');
33  clearTimeout(h.timer);
34  clearInterval(c.timer);
35  if(c.offsetHeight < c.maxh){
36    c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
37  }
38}
39
40// incrementally expand/contract the dropdown and change the opacity //
41function ddSlide(c,d){
42  var currh = c.offsetHeight;
43  var dist;
44  if(d == 1){
45    dist = (Math.round((c.maxh - currh) / DDSPEED));
46  }else{
47    dist = (Math.round(currh / DDSPEED));
48  }
49  if(dist <= 1 && d == 1){
50    dist = 1;
51  }
52  c.style.height = currh + (dist * d) + 'px';
53  c.style.opacity = currh / c.maxh;
54  c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
55  if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
56    clearInterval(c.timer);
57  }
58}
59

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.