PageSourceSearch

https://viviotech.net/wp-content/themes/hostinza/assets/js/hostslide.js?ver=3.1.0

js viviotech.net collected 2026-09-24 09:02:14 UTC 3,634 bytes, 94 lines download raw bytes

1(function($) {
2    "use strict";
3    $.fn.xsslide = function(type, plans, currentplan, id, orientation) {
4        if (typeof type != 'string') {
5            console.error("XSSlide: 'type' is not a string");
6            return false;
7        }
8        if (plans[0].length < 2) {
9            console.error("XSSlide: Not enough plans provided");
10            return false;
11        }
12        if (typeof currentplan != 'number') {
13            console.error("XSSlide: 'currentplan' is not a number");
14            return false;
15        }
16        if (typeof id != 'string') {
17            console.error("XSSlide: 'id' is not a string");
18            return false;
19        }
20        if (typeof orientation != 'string') {
21            console.error("XSSlide: 'orientation' is not a string");
22            return false;
23        }
24        if (orientation != 'horizontal' && orientation != 'vertical') {
25            console.error("XSSlide: " + orientation + " is not a valid slider orientation.");
26            return false;
27        }
28        if (type === "single") {
29            for (var i = 0, tot = plans.length; i < tot; i++) {
30                $("." + id + i).each(function() {
31                    if ($(this).is("input")) {
32                        $(this).val(plans[i][currentplan - 1]);
33                    } else {
34                        $(this).html(plans[i][currentplan - 1]);
35                    }
36                });
37            }
38            this.slider({
39                orientation: orientation,
40                value: currentplan,
41                range: "min",
42                min: 1,
43                max: plans[0].length + 1,
44                slide: function(event, ui) {
45                    for (var i = 0, tot = plans.length; i < tot; i++) {
46                        $("." + id + i).each(function() {
47                            if ($(this).is("input")) {
48                                $(this).val(plans[i][ui.value - 1]);
49                            } else {
50                                $(this).html(plans[i][ui.value - 1]);
51                            }
52                        });
53                    }
54                }
55            });
56            return this;
57        } else if (type === "multiple") {
58            for (var i = 0, tot = plans.length; i < tot; i++) {
59                (function(i) {
60                    $("." + id + i + "data").each(function() {
61                        if ($(this).is("input")) {
62                            $(this).val(plans[i][currentplan - 1]);
63                        } else {
64                            $(this).html(plans[i][currentplan - 1]);
65                        }
66                    });
67                    $("." + id + i).slider({
68                        orientation: orientation,
69                        value: currentplan,
70                        range: "min",
71                        min: 1,
72                        max: plans[i].length + 1,
73                        step: 1,
74                        slide: function(event, ui) {
75                            $("." + id + i + "data").each(function() {
76                                if ($(this).is("input")) {
77                                    $(this).val(plans[i][ui.value - 1]);
78                                } else {
79                                    $(this).html(plans[i][ui.value - 1]);
80                                }
81                            });
82                        }
83                    });
84                })(i);
85            }
86            return this;
87        } else {
88            console.error("XSSlide: " + type + " is not a valid slider type.");
89            return false;
90        }
91
92    };
93
94}(jQuery));

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.