PageSourceSearch

https://www.bettyconcept.com/wp-content/themes/BettyConcept/ruota.js

js bettyconcept.com collected 2026-09-29 16:23:01 UTC 2,437 bytes, 121 lines download raw bytes

1function init() {
2    chineseYear();
3}
4
5function chineseYear() {
6
7    jQuery("#spin").on("click", function () {
8        mainZodiac();
9    });
10
11    jQuery("#insert").keyup(function(event) {
12        if (event.keyCode == 13) {
13            mainZodiac();
14        }
15    });
16}
17
18function chineseZodiac(year) {
19    switch ((year - 4) % 12) {
20        case 0:
21            return "Topo";
22
23        case 1:
24            return "Bufalo";
25
26        case 2:
27            return "Tigre";
28
29        case 3:
30            return "Coniglio";
31
32        case 4:
33            return "Drago";
34
35        case 5:
36            return "Serpente";
37
38        case 6:
39            return "Cavallo";
40
41        case 7:
42            return "Capra";
43
44        case 8:
45            return "Scimmia";
46
47        case 9:
48            return "Gallo";
49
50        case 10:
51            return "Cane";
52
53        case 11:
54            return "Maiale";
55    }
56}
57
58function chineseWheel(year) {
59
60    var numYear = parseInt(year);
61    var num = 720;
62    num += numYear;
63    var defYear = num.toString();
64
65    jQuery(".dial").css({
66        transform: 'rotate(-' + defYear + 'deg)'
67    });
68}
69
70function mainZodiac() {
71    year = jQuery("#insert").val();
72
73    var value = jQuery(".img-zodiac").map(function () {
74        return jQuery(this).attr("alt");
75    }).get();
76
77    var valueRotate = jQuery(".box-label").map(function () {
78        return jQuery(this).attr("title");
79    }).get();
80
81    var obj = {};
82
83    for (i = 0; i < value.length; i++) {
84
85        obj[value[i]] = valueRotate[i];
86    }
87
88    for (var key in obj) {
89        var zodiac = chineseZodiac(year);
90
91        if (zodiac == key) {
92            chineseWheel(obj[key]);
93            setTimeout(function () {
94                jQuery("#spin").css({
95                    display: 'none'
96                });
97                jQuery("#insert").css({
98                    display: 'none'
99                });
100                jQuery("#repeat").css({
101                    display: 'block'
102                });
103            }, 6000);
104
105            jQuery("#repeat").click(function () {
106                jQuery("#spin").css({
107                    display: 'block'
108                });
109                jQuery("#insert").css({
110                    display: 'block'
111                });
112                jQuery("#repeat").css({
113                    display: 'none'
114                });
115                location.reload();
116            });
117        }
118    }
119}
120
121jQuery(document).ready(init);

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.