Greasy Fork is available in English.
页面旋转,自动滚动,图片集合
当前为 
// ==UserScript==
// @name         手机看图、小说适配
// @namespace    http://tampermonkey.net/
// @version      9.500.2.55
// @description  页面旋转,自动滚动,图片集合
// @author       You
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=pixabay.com
// @grant        unsafeWindow
// @require      https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// @license      MIT
// ==/UserScript==
$.noConflict();
jQuery.noConflict();
(function($) {
    'use strict';
    if (document.querySelector('.JqScroll')) {
        return
    }
    var urlhost = location.host.replace(/^www[.]/, "");
    var HDImg = 0;
    function clearBlank(urlB) {
        if (HDImg != 0) {
            urlB = urlB.replace(/(?<=[=])(thumbnail)$/, "normal")
                .replace(/(?<=[!])(thumbnail)$/, "webp")
                .replace(/&size=.{1,9}?(?=&|$)/, "")
                .replace(/[-=][0-9]{2,3}(x|%2C|&h=)[0-9]{2,3}(?=[.&]|$)/, "");
        }
        return urlB;
    }
    function dqSelect(selectPath) {
        return document.querySelectorAll(selectPath);
    }
    function addStyle(styleStr) {
        var style_node = document.createElement('style');
        style_node.type = 'text/css';
        style_node.innerHTML = styleStr;
        document.getElementsByTagName('head').item(0).appendChild(style_node);
    }
    function overHide() {
        if (window.innerWidth > $(document.body).outerWidth() + 10) {
            $(dqSelect("body")).css({
                "overflow-x": "hidden",
            });
        }
    }
    overHide();
    addStyle(
        "html {" +
        "overflow: scroll !important;" +
        "scroll-behavior: auto !important;}" +
        "body {" +
        "height: auto !important;}" +
        "html,body {" +
        "position: relative !important;" +
        "overflow-wrap: break-word !important;}");
    var winWidth = window.innerWidth;
    var winHeight = window.innerHeight;
    var winW = winWidth > winHeight ? winHeight * 0.9 : winWidth;
    var width = winW * 0.125;
    var height = winW * 0.1;
    var top = (winHeight - height) * 0.5;
    var fontSz = winW * 0.036;
    addStyle(
        "html,body {" +
        "min-height: " + winHeight + "px !important;}" +
        "#Jscroll-ul {" +
        "display: block !important;" +
        "position: relative !important;" +
        "top: 0 !important;" +
        "left: 0 !important;" +
        "overflow: visible !important;" +
        "width: 100% !important;" +
        "height: auto !important;" +
        "z-index: 2147483646 !important;" +
        "margin: 0 !important;" +
        "border: 0 !important;" +
        "padding: 50px 0 700px 0 !important;" +
        "background-color: black !important;}" +
        "#Jscroll-ul *{" +
        "box-sizing: border-box !important;" +
        "padding: 0 !important;" +
        "margin: 0 !important;" +
        "position: static !important;" +
        "float: none !important;" +
        "border-radius: 0 !important;" +
        "height: auto !important;" +
        "opacity: 1 !important;" +
        "visibility: visible !important;" +
        "background-color: black !important;" +
        "background-image: none !important;}" +
        "#Jscroll-ul *::before,#Jscroll-ul *::after{" +
        "display: none !important;}" +
        "#Jscroll-ul img{" +
        "display: block;" +
        "object-fit: contain !important;" +
        "min-height:" + (winW * 0.13) + "px !important;" +
        "width: 100% !important;" +
        "border-bottom: 1px solid gray !important;}" +
        "#Jscroll-ul span,#Jscroll-ul a{" +
        "font-size:" + (winW * 0.045) + "px !important;" +
        "color: white;" +
        "word-wrap: break-word !important;" +
        "line-height: normal !important;}" +
        "#Jscroll-ul a:visited{" +
        "color: #741274;}" +
        "#Jscroll-ul a{" +
        "display: inline-block;" +
        "min-height:" + (winW * 0.13) + "px !important;" +
        "width: auto;" +
        "min-width: 25% !important;" +
        "max-width: 100% !important;" +
        "border: 1px solid red;" +
        "vertical-align: top !important;" +
        "text-decoration: none !important;}" +
        "#Jscroll-ul a.ulHasImg{" +
        "min-width: 95% !important;}" +
        ".JqScroll{" +
        "opacity: 0.7 !important;" +
        "border-radius: 0px !important;" +
        "cursor: pointer !important;" +
        "z-index: 2147483647 !important;" +
        "padding: 0 !important;" +
        "font-weight: bold !important;" +
        "font-size: " + fontSz + "px !important;" +
        "line-height:12px !important;" +
        "border:2px solid white !important;" +
        "height:" + height + "px !important;" +
        "background-color:black !important;" +
        "color:white;" +
        "position:fixed !important;" +
        "width:" + width + "px !important;" +
        "left: 0%;" +
        "top: 0%;}" +
        ".word-text-big{" +
        "background-color: black !important;" +
        "color: white !important;" +
        "line-height: normal !important;" +
        "overflow-wrap: break-word !important;" +
        "height: auto !important;}");
    var jianG = winW * 0.1;
    var left2 = -0.125 * winW * 0.125;
    var left = winW * 0.125 + left2;
    var left3 = winW * 0.25 + left2;
    var sameCss = "margin-left:" + left + "px;";
    var sameCss2 = "margin-left:" + left2 + "px;";
    var sameCss3 = "margin-left:" + left3 + "px;";
    var scrollNum = parseInt(winW * 0.15 / 10) * 10;
    var scrollJu = scrollNum * 2;
    var secZ = 1;
    function addInput(id, value, style) {
        var input_node = document.createElement('input');
        input_node.type = "button";
        input_node.setAttribute("class", "JqScroll");
        input_node.setAttribute("id", id);
        input_node.setAttribute("value", value);
        input_node.setAttribute("style", style);
        $(document.body).append(input_node);
    }
    addInput('Jscroll-rotate', 'R', sameCss + "px;margin-top:" + (top) + "px");
    addInput('Jscroll-jian', '-', sameCss + "px;margin-top:" + (top - jianG) + "px");
    addInput('Jscroll-jia', '+', sameCss + "px;margin-top:" + (top - 2 * jianG) + "px");
    addInput('Jscroll-Ju', (scrollJu / scrollNum * 50), sameCss + "px;margin-top:" + (top - 3 * jianG) + "px");
    addInput('Jscroll-sec', secZ, sameCss + "px;margin-top:" + (top - 4 * jianG) + "px");
    addInput('Jscroll-down', "D", sameCss + "px;margin-top:" + (top - 5 * jianG) + "px");
    addInput('Jscroll-del', 'X', sameCss2 + "px;margin-top:" + (top) + "px");
    addInput('Jscroll-width', 'W', sameCss2 + "px;margin-top:" + (top - jianG) + "px");
    addInput('Jscroll-pic', 'P', sameCss2 + "px;margin-top:" + (top - 2 * jianG) + "px");
    addInput('Jscroll-xy', '▽', sameCss2 + "px;margin-top:" + (top - 3 * jianG) + "px");
    addInput('Jscroll-up', '△', sameCss2 + "px;margin-top:" + (top - 4 * jianG) + "px");
    addInput('Jscroll-picwh', '100', sameCss2 + "px;margin-top:" + (top - 5 * jianG) + "px");
    addInput('Jscroll-HD', "H", sameCss3 + "px;margin-top:" + (top) + "px");
    addInput('Jscroll-transform', "T", sameCss3 + "px;margin-top:" + (top - jianG) + "px");
    var Dtransform = 0;
    $(document.body).on('touchstart', '#Jscroll-transform', function() {
        Dtransform += 1;
        if (Dtransform % 2 != 0) {
            setTimeout(function() {
                $(document.body).css("cssText", $(document.body).attr("style") + ";transform: rotate(0deg) !important;");
                overHide();
            }, 200);
            $(dqSelect("#Jscroll-transform")).css("color", "green");
            $(document).on("scroll", bodyScroll);
            $(dqSelect("body")).on("scroll", bodyScroll);
        } else {
            $(document.body).css("cssText", $(document.body).attr("style") + ";transform: none !important;");
            $(dqSelect("#Jscroll-transform")).css("color", "white");
            $(dqSelect(".JqScroll")).css({
                "top": xMove == 1 ? top : 0,
                "left": 0
            });
            $(document).off("scroll", bodyScroll);
            $(dqSelect("body")).off("scroll", bodyScroll);
        }
    });
    var preScrollTop = $(window).scrollTop();
    function bodyScroll() {
        if (Dtransform % 2 != 0) {
            if (xMove == 0) {
                var scrollTop = $(window).scrollTop();
                $(dqSelect(".JqScroll")).css("top", scrollTop);
                if (Math.abs(scrollTop - preScrollTop) < 30) {
                    var JsVisible = $(dqSelect(".JqScroll")).not(":hidden");
                    JsVisible.hide();
                    setTimeout(function() {
                        JsVisible.show();
                    }, 600);
                }
                preScrollTop = scrollTop;
            } else {
                var scrollLeft = $(dqSelect("body")).scrollLeft();
                $(dqSelect(".JqScroll")).css("left", scrollLeft);
            }
        }
    }
    $(document.body).on('touchstart', '#Jscroll-HD', function() {
        HDImg += 1;
        if (HDImg == 2) {
            HDImg = 0
            $(dqSelect("#Jscroll-HD")).css("color", "white");
        } else {
            $(dqSelect("#Jscroll-HD")).css("color", "green");
        }
        if (picZ != 0) {
            picZ -= 1;
            $(dqSelect("#Jscroll-pic")).trigger("touchstart");
        }
    });
    var Drotate = 0;
    var xMove = 0;
    $(document.body).on('touchstart', '#Jscroll-rotate', function() {
        Drotate += 1;
        if (Drotate % 2 != 0) {
            $(dqSelect("#Jscroll-rotate")).css("color", "green");
            var wrap_rotate;
            var wrap_rotate_inner;
            if ($(dqSelect('#wrap_rotate')).length == 0) {
                wrap_rotate = $('<div />', {
                    id: "wrap_rotate"
                });
                wrap_rotate_inner = $('<div />', {
                    id: "wrap_rotate_inner"
                });
                $(document.body).wrapInner(wrap_rotate_inner).wrapInner(wrap_rotate);
            }
            wrap_rotate = $(dqSelect('#wrap_rotate'));
            wrap_rotate_inner = $(dqSelect('#wrap_rotate_inner'));
            setTimeout(function() {
                wrap_rotate.append($(dqSelect(".JqScroll")));
                $(dqSelect(".JqScroll")).css("top", top);
                wrap_rotate.attr('style', "display: block !important;" +
                    "z-index: 2147483647!important;" +
                    "position: relative !important;" +
                    "overflow: visible !important;" +
                    "height: " + (winHeight + 2) + "px !important;" +
                    "width: auto !important;");
                wrap_rotate_inner.attr('style', "display: block !important;" +
                    "z-index: 2147483647!important;" +
                    "position: relative !important;" +
                    "left: -100% !important;" +
                    "transform: rotateZ(-90deg) !important;" +
                    "transform-origin: 100% 0 !important;" +
                    "-webkit-transform: rotateZ(-90deg) !important;" +
                    "-webkit-transform-origin: 100% 0 !important;" +
                    "-moz-transform: rotateZ(-90deg) !important;" +
                    "-moz-transform-origin: 100% 0 !important;" +
                    "float: right !important;" +
                    "width: " + winHeight + "px !important;");
                xMove = 1;
                $(dqSelect("#wrap_rotate")).css({
                    "min-width": $(dqSelect("#wrap_rotate_inner")).outerHeight() + 1500,
                });
                $(dqSelect("body")).css({
                    "overflow-x": "visible",
                    "overflow-y": "scroll",
                });
                window.scrollTo(0, 0);
            }, 200);
        } else {
            $(dqSelect("#Jscroll-rotate")).css("color", "white");
            xMove = 0;
            setTimeout(function() {
                $(dqSelect('#wrap_rotate')).attr('style', "z-index: 2147483647!important;" +
                    "position: relative !important;" +
                    "display: block !important;");
                $(dqSelect('#wrap_rotate_inner')).attr('style', "z-index: 2147483647!important;" +
                    "position: relative !important;" +
                    "display: block !important;");
                $(dqSelect(".JqScroll")).css({
                    "top": 0,
                    "left": 0
                });
                overHide();
            }, 200);
        }
    });
    var widthN = 12;
    var fontZ;
    $(document.body).on('touchstart', '#Jscroll-width', function() {
        function interFn() {
            $(dqSelect("p,strong,span,h1,h2,h3")).filter(function() {
                return !$(this).is(":has(a)") || $(this).clone().children().remove().end().text().replace(/\s/g, "").length > 30;
            }).not(".word-text-big").addClass("word-text-big");
            $(dqSelect(":not(p,strong,span,h1,h2,h3)")).not(":has(li)").filter(function() {
                return $(this).clone().children().remove().end().text().replace(/\s/g, "").length > 100;
            }).not(".word-text-big").addClass("word-text-big");
            $(dqSelect(".word-text-big")).css(wordCss);
            var textImg = $(dqSelect(".word-text-big")).has("em,img");
            oldFSize = oldFSize == 0 && textImg.length > 0 ? textImg.first().find("em,img").first().width() : 0;
            var _scale = fSize != "inherit" && oldFSize != 0 ? parseInt(fSize / oldFSize * 100 * 1.1) / 100 : 1;
            textImg.find("em,img").css({
                "transform": "scale(" + _scale + ")",
                "-webkit-transform": "scale(" + _scale + ")",
                "-moz-transform": "scale(" + _scale + ")",
                "margin": "0 " + (_scale * 9 - 9) + "px",
                "filter": "drop-shadow(0px 0px white)",
                "-webkit-filter": "drop-shadow(0px 0px white)",
                "-moz-filter": "drop-shadow(0px 0px white)",
            });
            fSize == "inherit" ? $(dqSelect(".word-text-big")).removeClass("word-text-big") : false;
        }
        var fSize = widthN > 15 ? "inherit" : parseInt($(document).width() / widthN);
        var oldFSize = 0;
        var wordCss = {
            "font-size": fSize,
        }
        clearInterval(fontZ);
        interFn();
        if (fSize != "inherit") {
            fontZ = setInterval(interFn, 4 * 1000);
            $(dqSelect("#Jscroll-width")).val(20 - widthN).css("color", "green");
        } else {
            $(dqSelect("#Jscroll-width")).val("W").css("color", "white");
            widthN = 10;
        }
        widthN += 2;
    });
    $(document.body).on('click', ".word-text-big", function(e) {
        if ($(this).parents(".word-text-big").length == 0) {
            var touchX = e.clientX;
            var touchY = e.clientY;
            var fontH = parseInt($(this).css("font-size")) * 1.4;
            var scrollH = 0.5;
            if (xMove == 1) {
                var _scrollH = (winWidth - fontH) * (touchX > winWidth * scrollH ? 1 : -1);
                $(dqSelect("body")).scrollLeft($(dqSelect("body")).scrollLeft() + _scrollH);
            } else {
                window.scrollBy(0, (winHeight - fontH) * (touchY > winHeight * scrollH ? 1 : -1));
            }
        }
    });
    var picwh = 100;
    $(document.body).on('touchstart', "#Jscroll-picwh", function() {
        picwh += 100;
        $(dqSelect("#Jscroll-picwh")).val(picwh);
        $(dqSelect("#Jscroll-ul img")).each(function() {
            if (this.naturalWidth) {
                if (this.naturalWidth < picwh || this.naturalHeight < picwh) {
                    $(this).hide();
                }
            }
        });
    });
    var timeout_8;
    $(document.body).on('touchstart', '#Jscroll-picwh', function() {
        timeout_8 = setTimeout(function() {
            picwh = 100;
            $(dqSelect("#Jscroll-picwh")).val(picwh);
            $(dqSelect("#Jscroll-ul img")).filter(function() {
                return this.naturalWidth;
            }).show();
            $(dqSelect("#Jscroll-ul img")).each(function() {
                if (this.naturalWidth) {
                    if (this.naturalWidth < picwh || this.naturalHeight < picwh) {
                        $(this).hide();
                    }
                }
            });
        }, 500);
    }).on('touchend touchmove', '#Jscroll-picwh', function() {
        clearTimeout(timeout_8);
    });
    $(document.body).on('click', "#Jscroll-ul a", function() {
        if (Dscroll % 2 != 0) {
            $(dqSelect("#Jscroll-Ju")).trigger("touchstart");
        }
    });
    var widthZ;
    var picZ = 0;
    $(document.body).on('touchstart', "#Jscroll-pic", function() {
        function interFn() {
            var newImgAr = [];
            var _text = $(document.body).clone().children("script").remove().end().text()
                .match(/http.{1,150}?[.](jpg|png|gif|bmp|webp|jpeg)/g);
            var lenImg = $(dqSelect("div,li,a,img,[poster]")).length;
            $(dqSelect("div,li,a,img,[poster]")).each(function(inum, dom) {
                var dataObj = [];
                var _img = $(this);
                if (!_img.parent().is("#Jscroll-ul") && !_img.parent().parent().is("#Jscroll-ul")) {
                    var _backImg = _img.css("background-image").split(/"|"/);
                    if (picZ == 2 && inum == 0 && _text != null) {
                        dataObj = dataObj.concat(_text);
                    }
                    if (!/^(asdcosplay)/.test(urlhost)) {
                        dataObj = dataObj.concat(Object.values(_img.data()));
                        dataObj.push(
                            _img.attr("zsrc") ? _img.attr("zsrc") : "",
                            _img.attr("file") ? _img.attr("file") : "",
                            _img.attr("poster") ? _img.attr("poster") : "",
                            _backImg.length > 1 ? _backImg[1] : ""
                        );
                    }
                    dataObj.push(_img.attr("src") ? _img.attr("src") : "");
                    dataObj = dataObj.filter(function(i) {
                        return i != "";
                    });
                    var _imgsStr = "";
                    var _imgStr = "";
                    dataObj.forEach(function(i) {
                        i = i.toString().trim();
                        if (/[/?]/.test(i) && /^[/A-Za-z]/.test(i)) {
                            i = clearBlank(i);
                            _imgStr = "<img src='" + i + "' decoding='async' loading='lazy' height='" + parseInt(winHeight * 0.3) + "' width='" + parseInt(winWidth) + "' >";
                            if (picZ == 2) {
                                newImgAr.push(_imgStr);
                            }
                            if (picZ == 1 && preArr.indexOf(i) == -1) {
                                _imgsStr += _imgStr;
                                preArr.push(i);
                            }
                        }
                    });
                    if (picZ == 1 && (_imgsStr != "" || _img.is("a"))) {
                        var _pStr = (_img.attr("alt") ? _img.attr("alt") :
                            _img.attr("title") ? _img.attr("title") :
                            _img.text().length > 0 ? _img.text() :
                            _img.attr("class") ? _img.attr("class") : "").substring(0, 66);
                        if (_pStr != "") {
                            _pStr = "<span>" + _pStr + "</span>"
                        }
                        var _a = _img.closest("a");
                        var _href = _a.attr("href") ? "href='" + _a.attr("href") + "'" : "";
                        var _onclick = _a.attr("onclick") ? _a.attr("onclick") : "";
                        if (_href == "" && _onclick == "") {
                            _href = "style='border:1px solid gray;'";
                        }
                        var classStr = _imgsStr != "" ? " class='ulHasImg' " : "";
                        newImgAr.push("<a " + _href + classStr + " onclick=" + _onclick + ">" + _imgsStr + _pStr + "</a>");
                    }
                }
            });
            newImgAr = Array.from(new Set(newImgAr));
            if (newImgAr.toString() != imgAr.toString()) {
                var newArrEx = newImgAr.filter(function(n) {
                    return imgAr.indexOf(n) == -1
                });
                $(dqSelect("#Jscroll-ul")).append(newArrEx);
                $(dqSelect("#Jscroll-ul img")).on('error', function() {
                    $(this).hide();
                });
                $(dqSelect("#Jscroll-ul img")).on("load", function() {
                    var natuW = this.naturalWidth;
                    var natuH = this.naturalHeight;
                    if (natuW < picwh || natuH < picwh) {
                        $(this).hide();
                    } else {
                        _numH += 1;
                        if (picZ != 1 && _numH < 9) {
                            _allH += natuW < natuH ? natuW : natuH;
                            if (_numH % 4 == 0) {
                                picwh = parseInt(_allH * 0.5 / _numH / 100) * 100;
                                picwh = picwh > 100 ? picwh : 100;
                                $(dqSelect("#Jscroll-picwh")).val(picwh);
                            }
                        }
                    }
                });
                imgAr = newImgAr;
            }
        }
        clearInterval(widthZ);
        $(dqSelect("#Jscroll-ul")).remove();
        picZ += 1;
        if (picZ < 3) {
            if ($(dqSelect('#wrap_rotate')).length != 0) {
                $(dqSelect("#wrap_rotate_inner")).prepend("<div id='Jscroll-ul'>");
            } else {
                $(document.body).prepend("<div id='Jscroll-ul'>");
            }
            picwh = 100;
            var imgAr = [];
            var preArr = [];
            var _allH = 0;
            var _numH = 0;
            $(dqSelect("#Jscroll-picwh")).val(picwh);
            $(dqSelect("#Jscroll-pic")).css("color", "green").val(picZ);
            interFn();
            widthZ = setInterval(interFn, 6000);
        } else {
            $(dqSelect("#Jscroll-pic")).css("color", "white").val("P");
            picZ = 0;
        }
    });
    var downImg, pageX_2, pageY_2;
    var NDown = 0;
    $(document.body).on('touchstart', "#Jscroll-down", function() {
        NDown += 1;
        clearInterval(downImg);
        if (NDown % 2 != 0) {
            pageX_2 = $(window).scrollLeft();
            pageY_2 = $(window).scrollTop();
            $(dqSelect("#Jscroll-down")).css("color", "green");
            downImg = setInterval(function() {
                var newTop = $(document).height();
                xMove == 1 ? $(dqSelect("body")).scrollLeft($(dqSelect("body")).scrollLeft() + newTop) : window.scrollBy(0, newTop);
            }, 200);
        } else {
            $(dqSelect("#Jscroll-down")).css("color", "white");
            setTimeout(function() {
                xMove == 1 ? $(dqSelect("body")).scrollLeft(pageX_2) : window.scrollTo(pageX_2, pageY_2);
            }, 100);
        }
    });
    $(document.body).on('click', "#Jscroll-ul>*:not(a)", function(e) {
        var touchX = e.clientX;
        var touchY = e.clientY;
        var howH = xMove == 1 ? 0.5 : 0.4;
        var scrollH = 0.5;
        if (xMove == 1) {
            var _scrollH = winWidth * howH * (touchX > winWidth * scrollH ? 1 : -1);
            $(dqSelect("body")).scrollLeft($(dqSelect("body")).scrollLeft() + _scrollH);
        } else {
            window.scrollBy(0, winHeight * howH * (touchY > winHeight * scrollH ? 1 : -1));
        }
    });
    $(document.body).on('touchstart', '#Jscroll-sec', function() {
        secZ -= 1;
        if (secZ < 0) {
            secZ = 2
        }
        if (secZ < 1) {
            secZ = 0.6
        }
        $(dqSelect("#Jscroll-sec")).val(secZ);
        if (Dscroll % 2 != 0) {
            Dscroll = 0;
            $(dqSelect("#Jscroll-Ju")).trigger("touchstart");
        }
    });
    var Dxy = 0;
    var pageX;
    var pageY;
    var timeHu;
    $(document.body).on('touchstart', '#Jscroll-xy', function() {
        var toH;
        if (xMove != 1) {
            toH = $(document).height();
        } else {
            toH = $(dqSelect("#wrap_rotate_inner")).outerHeight() - 250;
        }
        Dxy += 1;
        clearTimeout(timeHu);
        if (Dxy % 2 == 1) {
            pageX = $(dqSelect("body")).scrollLeft();
            pageY = $(window).scrollTop();
            if (xMove == 1) {
                $(dqSelect("body")).scrollLeft($(dqSelect("body")).scrollLeft() + toH);
            } else {
                window.scrollTo(0, toH);
            }
            $(dqSelect("#Jscroll-xy")).val("=");
            $(dqSelect("#Jscroll-up")).val("=");
            timeHu = setTimeout(function() {
                Dxy += 1;
                $(dqSelect("#Jscroll-up")).val("△");
                $(dqSelect("#Jscroll-xy")).val("▽");
            }, 10 * 1000);
        } else {
            if (xMove == 1) {
                $(dqSelect("body")).scrollLeft(pageX);
            } else {
                window.scrollTo(pageX, pageY);
            }
            $(dqSelect("#Jscroll-up")).val("△");
            $(dqSelect("#Jscroll-xy")).val("▽");
        }
    });
    $(document.body).on('touchstart', '#Jscroll-up', function() {
        Dxy += 1;
        clearTimeout(timeHu);
        if (Dxy % 2 == 1) {
            pageX = $(dqSelect("body")).scrollLeft();
            pageY = $(window).scrollTop();
            if (xMove == 1) {
                $(dqSelect("body")).scrollLeft(0);
            } else {
                window.scrollTo(0, 0);
            }
            $(dqSelect("#Jscroll-xy")).val("=");
            $(dqSelect("#Jscroll-up")).val("=");
            timeHu = setTimeout(function() {
                Dxy += 1;
                $(dqSelect("#Jscroll-up")).val("△");
                $(dqSelect("#Jscroll-xy")).val("▽");
            }, 10 * 1000);
        } else {
            if (xMove == 1) {
                $(dqSelect("body")).scrollLeft(pageX);
            } else {
                window.scrollTo(pageX, pageY);
            }
            $(dqSelect("#Jscroll-up")).val("△");
            $(dqSelect("#Jscroll-xy")).val("▽");
        }
    });
    setTimeout(function() {
        $(dqSelect(".JqScroll")).hide();
        $(dqSelect("#Jscroll-del")).show().css({
            "opacity": "0.4",
            "-webkit-transform": "scale(0.72)",
            "-moz-transform": "scale(0.72)",
            "transform": "scale(0.72)",
        });
    }, 100);
    var Dhide = 1;
    $(document.body).on('touchstart', '#Jscroll-del', function() {
        Dhide += 1;
        if (Dhide % 2 != 0) {
            $(dqSelect(".JqScroll")).hide();
            $(dqSelect("#Jscroll-del")).show().css({
                "opacity": "0.4",
                "-webkit-transform": "scale(0.72)",
                "-moz-transform": "scale(0.72)",
                "transform": "scale(0.72)",
            });
        } else {
            $(dqSelect(".JqScroll")).show();
            $(dqSelect("#Jscroll-del")).css({
                "opacity": "0.8",
                "-webkit-transform": "scale(1)",
                "-moz-transform": "scale(1)",
                "transform": "scale(1)",
            });
            if (Dscroll % 2 != 0) {
                $(dqSelect("#Jscroll-Ju")).trigger("touchstart");
            }
        }
    });
    var timeout_2;
    $(document.body).on('touchstart', '#Jscroll-del', function() {
        timeout_2 = setTimeout(function() {
            $(dqSelect(".JqScroll")).hide();
            $(dqSelect("#Jscroll-del")).css({
                "opacity": "0.4",
                "-webkit-transform": "scale(0.72)",
                "-moz-transform": "scale(0.72)",
                "transform": "scale(0.72)",
            });
            if (Dhide % 2 == 0) {
                Dhide += 1;
            }
        }, 700);
    }).on('touchend touchmove', '#Jscroll-del', function() {
        clearTimeout(timeout_2);
    });
    var timeout_3;
    $(document.body).on('touchstart', function() {
        timeout_3 = setTimeout(function() {
            $(dqSelect("#Jscroll-del")).show();
        }, 500);
    }).on('touchend touchmove', function() {
        clearTimeout(timeout_3);
    });
    $(document.body).on('touchstart', '#Jscroll-jia', function() {
        scrollJu += scrollNum;
        $(dqSelect("#Jscroll-Ju")).val(scrollJu / scrollNum * 50);
    });
    $(document.body).on('touchstart', '#Jscroll-jian', function() {
        scrollJu -= scrollNum;
        $(dqSelect("#Jscroll-Ju")).val(scrollJu / scrollNum * 50);
    });
    var timeout_4;
    $(document.body).on('touchstart', '#Jscroll-jian', function() {
        timeout_4 = setTimeout(function() {
            scrollJu -= scrollNum * 5;
            $(dqSelect("#Jscroll-Ju")).val(scrollJu / scrollNum * 50);
        }, 500);
    }).on('touchend touchmove', '#Jscroll-jian', function() {
        clearTimeout(timeout_4);
    });
    var timeout_5;
    $(document.body).on('touchstart', '#Jscroll-jia', function() {
        timeout_5 = setTimeout(function() {
            scrollJu += scrollNum * 5;
            $(dqSelect("#Jscroll-Ju")).val(scrollJu / scrollNum * 50);
        }, 500);
    }).on('touchend touchmove', '#Jscroll-jia', function() {
        clearTimeout(timeout_5);
    });
    var Dscroll = 0;
    var timeDown;
    $(document.body).on('touchstart', '#Jscroll-Ju', function() {
        Dscroll += 1;
        if (Dscroll % 2 != 0) {
            $(dqSelect("#Jscroll-Ju")).css("color", "green");
            clearInterval(timeDown);
            timeDown = setInterval(function() {
                if (xMove == 1) {
                    $(dqSelect("body")).scrollLeft($(dqSelect("body")).scrollLeft() + scrollJu);
                } else {
                    window.scrollBy(0, scrollJu);
                }
            }, secZ * 1000);
        } else {
            $(dqSelect("#Jscroll-Ju")).css("color", "white");
            clearInterval(timeDown);
        }
    });
    // Your code here...
})(jQuery);