PageSourceSearch

https://pulxion.com.tw/js-plugin/fakeLoader/fakeLoader.min.miracle.js?=v4

js pulxion.com.tw collected 2026-10-07 19:09:37 UTC 4,508 bytes, 63 lines download raw bytes

1(function (c) {
2    function d() {
3        
4        if(c("#fakeLoader_img").length>0){
5            c("#fakeLoader_img").load(function(){
6                var d = c(window).width(), b = c(window).height(), a = c(".fl").outerWidth(), f = c(".fl").outerHeight(); 
7                c(".fl").css({ position: "absolute", left: d / 2 - a / 2, top: b / 2 - f / 2 }).show()    
8            })
9        }else{
10            var d = c(window).width(), b = c(window).height(), a = c(".fl").outerWidth(), f = c(".fl").outerHeight(); 
11            c(".fl").css({ position: "absolute", left: d / 2 - a / 2, top: b / 2 - f / 2 }).show()
12        }
13    } c.fn.fakeLoader = function (e) {
14        var b = c.extend({ timeToHide: 1200, pos: "fixed", top: "0px", left: "0px", width: "100%", height: "100%", zIndex: "999", bgColor: "#2ecc71", spinner: "spinner7", imagePath: "" }, e), a = c(this); a.css({ position: b.pos, width: b.width, height: b.height, top: b.top, left: b.left }); a.each(function () {
15            switch (b.spinner) {
16                case "spinner1": a.html('<div class="fl spinner1"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>');
17                    break; case "spinner2": a.html('<div class="fl spinner2"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div>');
18                    break; case "spinner3": a.html('<div class="fl spinner3"><div class="dot1"></div><div class="dot2"></div></div>');
19                    break; case "spinner4": a.html('<div class="fl spinner4"></div>');
20                    break; case "spinner5": a.html('<div class="fl spinner5"><div class="cube1"></div><div class="cube2"></div></div>');
21                    break; case "spinner6": a.html('<div class="fl spinner6"><div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div><div class="rect5"></div></div>');
22                    break; case "spinner7": a.html('<div class="fl spinner7"><div class="circ1"></div><div class="circ2"></div><div class="circ3"></div><div class="circ4"></div></div>');
23                    break; case "spinner8": a.html('<div class="fl spinner8"><div class="cssload-main"><span class="cssload-spinner"></span></div></div>');
24                    break;
25                default: a.html('<div class="fl spinner1"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>')
26            }"" != b.imagePath && (a.html('<div class="fl"><img id="fakeLoader_img" src="' + b.imagePath + '"></div>'), d())
27        });
28        setTimeout(function () {
29            c(a).fadeOut();
30            $("body").removeClass("fakeLoadering");
31            //{jane 2019.10.24 修正補上如果有帶 hash tag 在 loading 完後要滑去
32            var hash = window.location.hash;
33            // console.log('hash:' + hash);
34            if (hash != '') {
35                $('html, body').animate({
36                    scrollTop: $(hash).offset().top
37                }, 2000);
38            }
39            //}
40        }, b.timeToHide);
41        //2020-02-03 發現有些內容比較少的內頁不會出現中間的loading樣式。故調整這個function的執行順序至此
42        d();
43        return this.css({ backgroundColor: b.bgColor, zIndex: b.zIndex })
44    }; c(document).ready(function () {
45        //2020-02-03 發現有些內容比較少的內頁不會出現中間的loading樣式。故調整這個function的執行順序不在ready的時候做
46        //d();
47
48        $("body").addClass("fakeLoadering");
49        // console.log('fakeLoadering');
50        if (!!window.performance && window.performance.navigation.type === 2) {
51            // 這邊是用 history back 2020.03.20 jane add
52        } else {
53            $(document).bind("scroll", function () {
54                if ($("body").hasClass("fakeLoadering")) {
55                    $(document).scrollTop(0);
56                }
57            });
58        }
59        c(window).resize(function () { d() })
60    })
61})(jQuery);
62//$("body").addClass("bodyhidden");
63//$("body").removeClass("bodyhidden") 

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.