PageSourceSearch

https://www.miyazaki-hishimeki.com/shared_top/js/iphone.js

js miyazaki-hishimeki.com collected 2026-10-04 19:33:58 UTC 1,780 bytes, 46 lines download raw bytes

1
2//fix scroll ios
3var overflowIsHidden = function(node) {
4    var style = getComputedStyle(node);
5    return style.overflow === "hidden" || style.overflowX === "hidden" || style.overflowY === "hidden";
6}
7
8var isItScrollableWithoutVisibleScrollbars = function(el) {
9    if (el === null) return false;
10
11    var isScrollable = false,
12        hasScrollbars = false;
13
14    isScrollable = el.scrollHeight > el.offsetHeight ? true : false; // first, lets find out if it has scrollable content
15    // isScrollable = el.scrollHeight + 1 > el.clientHeight ? true : false; // first, lets find out if it has scrollable content
16
17    if (isScrollable) hasScrollbars = (el.offsetWidth > el.scrollWidth) ? true : false; // if it's scrollable, let's see if it likely has scrollbars
18    // if (isScrollable) hasScrollbars = (el.offsetWidth > el.scrollWidth - 1) ? true : false; // if it's scrollable, let's see if it likely has scrollbars
19
20    if (isScrollable && !hasScrollbars && !overflowIsHidden(el)) return true;
21    else return false;
22};
23//
24//document.addEventListener("touchmove", function(e) {
25//    if (document.body.classList.contains("nav--opened") && !isItScrollableWithoutVisibleScrollbars(document.getElementById("menu-toggle"))) e.preventDefault();
26//}, {
27//    passive: false
28//});
29
30document.addEventListener("touchmove", function(e) {
31    if (document.body.classList.contains("nav--opened")) {
32        if (!isItScrollableWithoutVisibleScrollbars(document.getElementById("menu-toggle")) || $(e.target).parents("#menu-toggle").length < 1) e.preventDefault();
33    }
34}, {
35    passive: false
36});
37
38
39window.addEventListener("resize", function() {
40    var _event_ = new Event("touchmove");
41
42    document.dispatchEvent(_event_); // trigger
43}, {
44    passive: false
45});
46// END: fix scroll iOS

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.