94 |
95 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/index.css:
--------------------------------------------------------------------------------
1 | /*Imports*/
2 | @import url("https://fonts.googleapis.com/css?family=Encode Sans");
3 | @import url("https://fonts.googleapis.com/css?family=Montserrat:500,600,700,800,900,1000|Questrial");
4 | /*End Imports*/
5 | /*Start General CSS*/
6 |
7 | body {
8 | font-family: Montserrat;
9 | font-weight: 700;
10 | background-color: #F1F1F1;
11 | }
12 |
13 | img {
14 | border-radius: 20px;
15 | }
16 |
17 | a {
18 | text-decoration: none;
19 | color: white;
20 | transition: all, ease, 0.5s;
21 | }
22 | .donate-button {
23 | padding: 10px 20px;
24 | font-size: 20px;
25 | font-family: Montserrat;
26 | border: none;
27 | font-weight: bold;
28 | border-radius: 10px;
29 | color: white;
30 | }
31 | a:hover, a:focus, a:visited {
32 | text-decoration: underline;
33 | transition: all, ease, 0.5s;
34 | }
35 |
36 | #year {
37 | font-size: 20px;
38 | border-radius: 20px;
39 | outline: none;
40 | }
41 |
42 | #page {
43 | left: 50%;
44 | }
45 | .statistics {
46 | text-align: left;
47 | font-family:Montserrat;
48 | font-weight: 800;
49 | }
50 | hr {
51 | border-bottom-style: solid;
52 | border-bottom-width: 1px;
53 | border-bottom-color: #345;
54 | }
55 | .topfive {
56 | width:22s0px;
57 | }
58 |
59 |
60 | h1 {font-size: 85px;}
61 |
62 | h2 {font-size: 40px;}
63 |
64 | h3 {font-size: 30px;}
65 |
66 | h1, h2, h3 {
67 | font-weight: 800;
68 | font-family: 'Montserrat';
69 | }
70 |
71 | .noBottomMargin {margin-bottom: 0px;
72 | text-align:left;
73 | }
74 |
75 | .text-block {
76 | background-color: #3D6BFF;
77 | border-radius: 10px;
78 | padding-left: 40px;
79 | padding-right: 40px;
80 | padding-bottom: 30px;
81 | display: inline-block;
82 | color: white;
83 | font-family: Montserrat;
84 | font-weight: 800;
85 | box-shadow: 0 4px 6px rgba(34,25,25,0.3);
86 | }
87 |
88 | /*End General CSS*/
89 | /*Start Navigation Bar CSS*/
90 | #navbar {
91 | list-style-type: none;
92 | display: table;
93 | }
94 |
95 | #outerNavBar {
96 | width: 100%;
97 | background-color: #25aff4;
98 | margin: 0;
99 | position: fixed;
100 | top: 0;
101 | left: 0;
102 | }
103 |
104 | #outerNavBar a {
105 | text-decoration: none;
106 | color: white;
107 | }
108 |
109 | .navbar-item:hover, .navbar-item:active {background-color: #219DDB;}
110 |
111 | .navbar-item {
112 | display: table-cell;
113 | padding-left: 8px;
114 | padding-right: 8px;
115 | color: white;
116 | font-family: Montserrat;
117 | vertical-align: middle;
118 | width: 120px;
119 | }
120 |
121 | .navbar-text {line-height: 45px;}
122 |
123 | /*End Navigation Bar CSS*/
124 | /*Start index.html specific CSS*/
125 | .examples {padding: 5px;}
126 |
127 | /*End index.html specific CSS*/
128 | /*Start stats.html specific CSS*/
129 | .button {
130 | border-radius: 20px;
131 | height: 50px;
132 | width: 180px;
133 | border: none;
134 | background-color: #25aff4;
135 | color: white;
136 | font-size: 20px;
137 | }
138 |
139 | .button:focus {outline: none;}
140 |
141 | .button:hover {
142 | cursor: pointer;
143 | background-color: #219DDB;
144 |
145 | transition: all 0.5s ease;
146 | }
147 |
148 | /*End stats.html specific CSS*/
149 | /*Start user-stats.html specific CSS*/
150 | #in {
151 | outline: none;
152 | border-radius: 5px;
153 | border: solid #666666;
154 | height: 30px;
155 | width: 290px;
156 | font-size: 20px;
157 | }
158 |
159 | .statstable {
160 | width: 1200px;
161 | overflow-y: hidden;
162 | font-weight: 500;
163 | }
164 |
165 | .statistics {
166 | font-size: 15px;
167 | font-weight: 500;
168 | }
169 |
170 | .projTitle {
171 | font-size:20px;
172 | font-weight: 500;
173 | }
174 |
175 | td {
176 | padding-left: 8px;
177 | padding-right: 8px;
178 | text-align: center;
179 | }
180 |
181 | a.emoji_react_link.add {
182 | border-color: rgba(79,176,252,.75);
183 | background-color: rgba(79,176,252,.08);
184 | }
185 |
186 | a.emoji_react_link.remove {
187 | background-color:white;
188 | }
189 |
190 | .project {
191 |
192 | width: 260px;
193 | }
194 |
195 | #in:focus {border: solid #848484;}
196 |
197 | .answer {
198 | font-weight: bold;
199 | font-size: 45px;
200 | }
201 |
202 | .special {
203 | font-weight: bold;
204 | }
205 |
206 | .question {
207 | font-weight: 500;
208 | }
209 |
210 | #messagesRead {
211 | font-size: 40px;
212 | }
213 |
214 | /*End user-stats.html specific CSS*/
215 |
216 | h1, h2, h3, h4, h5, p, div {
217 | font-family: Montserrat;
218 | font-weight:800;
219 | }
220 |
--------------------------------------------------------------------------------
/donate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
Donate
64 |
65 | Creating this webpage was an amazing project. We learnt a lot of new things. It sparked our excitement for the web - there are billions of things out there nobody has coded yet!
66 | However, this wasn't an effortless project. We've spent hours, if not days in the project. Please support us by sending a small donation.
67 | If you find this website useful and you'd like to help some coders, buy us a coffee, or just be an all around awesome person, donate to us in PayPal or cryptocurrency.
68 | If you donate at least 3 USD, you'll receive an ad in the homepage of ScratchStats for at least 60 days. Ads will be shown at least 1 for every 2 times our page is visited, getting you up to 100 weekly clicks of users interested in your project. Contact @World_Languages on Scratch to get your banner.
69 |
70 |
71 | Paypal: SheshankS
72 | Bitcoin (BTC): 16UdzFaz33Tb4r8tPP5KsEqyUFN1bSXEx3
73 | Bitcoin Cash (BCH): bitcoincash:qzq8yurtqtp9pv3ahwyhj2mcagrjxjpwfv8rmwr5sh
74 | HandCash.io handle (BCH): $World_Languages
75 | Ethereum (ETH): 0xf4c2872155971222ec964b110cc0fab043c2d825
76 | Litecoin (LTC): LUomjxRzUk9jQWzyaX6N9zShgM78HhU7Px
77 | Dogecoin (DOGE): DHET426p3qbAY63hmUBKGAq6SD58PSNUZW
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
Thank you, donors!
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/sweetalert2.min.css:
--------------------------------------------------------------------------------
1 | body.swal2-shown{overflow-y:hidden}body.swal2-iosfix{position:fixed;left:0;right:0}.swal2-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:fixed;top:0;left:0;bottom:0;right:0;padding:10px;background-color:transparent;z-index:1060}.swal2-container.swal2-fade{-webkit-transition:background-color .1s;transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-modal{background-color:#fff;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:5px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;margin:auto;overflow-x:hidden;overflow-y:auto;display:none;position:relative;max-width:100%}.swal2-modal:focus{outline:0}.swal2-modal.swal2-loading{overflow-y:hidden}.swal2-modal .swal2-title{color:#595959;font-size:30px;text-align:center;font-weight:600;text-transform:none;position:relative;margin:0 0 .4em;padding:0;display:block;word-wrap:break-word}.swal2-modal .swal2-buttonswrapper{margin-top:15px}.swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4;cursor:no-drop}.swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm{-webkit-box-sizing:border-box;box-sizing:border-box;border:4px solid transparent;border-color:transparent;width:40px;height:40px;padding:0;margin:7.5px;vertical-align:top;background-color:transparent!important;color:transparent;cursor:default;border-radius:100%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel{margin-left:30px;margin-right:30px}.swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;content:'';margin-left:5px;vertical-align:-1px;height:15px;width:15px;border:3px solid #999;-webkit-box-shadow:1px 1px 1px #fff;box-shadow:1px 1px 1px #fff;border-right-color:transparent;border-radius:50%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal}.swal2-modal .swal2-styled{border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;cursor:pointer;font-size:17px;font-weight:500;margin:15px 5px 0;padding:10px 32px}.swal2-modal .swal2-image{margin:20px auto;max-width:100%}.swal2-modal .swal2-close{background:0 0;border:0;margin:0;padding:0;width:38px;height:40px;font-size:36px;line-height:40px;font-family:serif;position:absolute;top:5px;right:8px;cursor:pointer;color:#ccc;-webkit-transition:color .1s ease;transition:color .1s ease}.swal2-modal .swal2-close:hover{color:#d55}.swal2-modal>.swal2-checkbox,.swal2-modal>.swal2-file,.swal2-modal>.swal2-input,.swal2-modal>.swal2-radio,.swal2-modal>.swal2-select,.swal2-modal>.swal2-textarea{display:none}.swal2-modal .swal2-content{font-size:18px;text-align:center;font-weight:300;position:relative;float:none;margin:0;padding:0;line-height:normal;color:#545454;word-wrap:break-word}.swal2-modal .swal2-checkbox,.swal2-modal .swal2-file,.swal2-modal .swal2-input,.swal2-modal .swal2-radio,.swal2-modal .swal2-select,.swal2-modal .swal2-textarea{margin:20px auto}.swal2-modal .swal2-file,.swal2-modal .swal2-input,.swal2-modal .swal2-textarea{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:18px;border-radius:3px;border:1px solid #d9d9d9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-shadow:inset 0 1px 1px rgba(0,0,0,.06);-webkit-transition:border-color .3s,-webkit-box-shadow .3s;transition:border-color .3s,-webkit-box-shadow .3s;transition:border-color .3s,box-shadow .3s;transition:border-color .3s,box-shadow .3s,-webkit-box-shadow .3s}.swal2-modal .swal2-file.swal2-inputerror,.swal2-modal .swal2-input.swal2-inputerror,.swal2-modal .swal2-textarea.swal2-inputerror{border-color:#f27474!important;-webkit-box-shadow:0 0 2px #f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-modal .swal2-file:focus,.swal2-modal .swal2-input:focus,.swal2-modal .swal2-textarea:focus{outline:0;border:1px solid #b4dbed;-webkit-box-shadow:0 0 3px #c4e6f5;box-shadow:0 0 3px #c4e6f5}.swal2-modal .swal2-file:focus::-webkit-input-placeholder,.swal2-modal .swal2-input:focus::-webkit-input-placeholder,.swal2-modal .swal2-textarea:focus::-webkit-input-placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file:focus:-ms-input-placeholder,.swal2-modal .swal2-input:focus:-ms-input-placeholder,.swal2-modal .swal2-textarea:focus:-ms-input-placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file:focus::placeholder,.swal2-modal .swal2-input:focus::placeholder,.swal2-modal .swal2-textarea:focus::placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file::-webkit-input-placeholder,.swal2-modal .swal2-input::-webkit-input-placeholder,.swal2-modal .swal2-textarea::-webkit-input-placeholder{color:#e6e6e6}.swal2-modal .swal2-file:-ms-input-placeholder,.swal2-modal .swal2-input:-ms-input-placeholder,.swal2-modal .swal2-textarea:-ms-input-placeholder{color:#e6e6e6}.swal2-modal .swal2-file::placeholder,.swal2-modal .swal2-input::placeholder,.swal2-modal .swal2-textarea::placeholder{color:#e6e6e6}.swal2-modal .swal2-range input{float:left;width:80%}.swal2-modal .swal2-range output{float:right;width:20%;font-size:20px;font-weight:600;text-align:center}.swal2-modal .swal2-range input,.swal2-modal .swal2-range output{height:43px;line-height:43px;vertical-align:middle;margin:20px auto;padding:0}.swal2-modal .swal2-input{height:43px;padding:0 12px}.swal2-modal .swal2-input[type=number]{max-width:150px}.swal2-modal .swal2-file{font-size:20px}.swal2-modal .swal2-textarea{height:108px;padding:12px}.swal2-modal .swal2-select{color:#545454;font-size:inherit;padding:5px 10px;min-width:40%;max-width:100%}.swal2-modal .swal2-radio{border:0}.swal2-modal .swal2-radio label:not(:first-child){margin-left:20px}.swal2-modal .swal2-radio input,.swal2-modal .swal2-radio span{vertical-align:middle}.swal2-modal .swal2-radio input{margin:0 3px 0 0}.swal2-modal .swal2-checkbox{color:#545454}.swal2-modal .swal2-checkbox input,.swal2-modal .swal2-checkbox span{vertical-align:middle}.swal2-modal .swal2-validationerror{background-color:#f0f0f0;margin:0 -20px;overflow:hidden;padding:10px;color:gray;font-size:16px;font-weight:300;display:none}.swal2-modal .swal2-validationerror::before{content:'!';display:inline-block;width:24px;height:24px;border-radius:50%;background-color:#ea7d7d;color:#fff;line-height:24px;text-align:center;margin-right:10px}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}.swal2-icon{width:80px;height:80px;border:4px solid transparent;border-radius:50%;margin:20px auto 30px;padding:0;position:relative;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;display:block}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.swal2-icon.swal2-warning{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#f8bb86;border-color:#facea8;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-info{font-family:'Open Sans',sans-serif;color:#3fc3ee;border-color:#9de0f6;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-question{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#87adbd;border-color:#c9dae1;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{border-radius:50%;position:absolute;width:60px;height:120px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.swal2-icon.swal2-success .swal2-success-ring{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);border-radius:50%;-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal2-icon.swal2-success .swal2-success-fix{width:7px;height:90px;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{font-weight:600;margin:0 0 20px;padding:0}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{background:#3085d6;border-radius:2em;color:#fff;height:2em;line-height:2em;text-align:center;width:2em;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{background:#3085d6;height:.4em;margin:0 -1px;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}.swal2-show{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:hideSweetAlert .15s forwards;animation:hideSweetAlert .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}@-webkit-keyframes animate-success-tip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animate-success-tip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animate-success-long{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animate-success-long{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}.swal2-animate-success-line-tip{-webkit-animation:animate-success-tip .75s;animation:animate-success-tip .75s}.swal2-animate-success-line-long{-webkit-animation:animate-success-long .75s;animation:animate-success-long .75s}.swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}.swal2-animate-error-icon{-webkit-animation:animate-error-icon .5s;animation:animate-error-icon .5s}@-webkit-keyframes animate-x-mark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animate-x-mark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.swal2-animate-x-mark{-webkit-animation:animate-x-mark .5s;animation:animate-x-mark .5s}@-webkit-keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
2 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
Stats | ScratchStats.com
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | Get an ad here by donating .
64 |
65 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
Average project stats
82 |
83 |
84 |
85 |
86 |
87 | .
88 |
89 |
90 | .
91 |
92 |
93 | .
94 |
95 |
96 |
97 |
98 |
99 | .
100 | Love To View Ratio
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
Best project per stat
111 |
112 |
113 |
114 |
115 | .
116 | Most 💖/⭐ Project
117 |
118 |
122 |
123 | .
124 | Most 👍 Project
125 |
126 |
127 | .
128 | Most 👁️ Project
129 |
130 |
131 |
132 | Most 💬 Project
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | Total
145 | Yearly
146 | Monthly
147 | Daily
148 |
149 | Amount per stat
150 |
151 |
152 |
153 |
154 |
155 | .
156 |
157 |
158 | .
159 |
160 |
161 | .
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
Activity by the user last 12 months
175 |
176 |
177 |
178 |
179 | .
180 |
181 |
182 | .
183 |
184 |
185 | .
186 | Users Followed
187 |
188 |
189 | .
190 | Studios Followed
191 |
192 |
193 | .
194 | New Studios Curated
195 |
196 |
197 | .
198 | New Projects Shared
199 |
200 |
201 | .
202 | Total Activity Actions
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
Miscellaneous
212 |
213 |
214 |
215 |
216 | .
217 | Join Date (UTC)
218 |
219 |
220 | .
221 | ID Number
222 |
223 |
224 | .
225 | Country
226 |
227 |
228 |
229 |
230 | .
231 | Current Message Count
232 |
233 |
234 | .
235 | Browser
236 |
237 |
238 | .
239 | Operating System
240 |
241 |
242 |
243 |
244 | ↓
245 | Current Message Count
246 |
247 |
248 | ↓
249 | Browser
250 |
251 |
252 | ↓
253 | Operating System
254 |
255 |
256 |
257 |
258 |
259 |
260 |
283 | Please press the box to load the data above 🛈
284 | By pressing the box you are supporting ScratchStats allowing us to calculate a low amount of complex math operations.Load without calculations
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
302 |
303 |
304 |
305 |
--------------------------------------------------------------------------------
/global-stats.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
Global Stats | ScratchStats.com
15 |
16 |
17 |
18 |
19 |
20 |
130 |
131 |
132 |
133 |
134 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
Global Statistics
169 |
170 |
171 |
172 |
173 |
174 |
175 |
Popular Projects (From Explore)
176 |
177 |
178 |
179 |
180 | .
181 |
182 |
183 |
184 |
185 |
186 | .
187 |
188 |
189 |
190 |
191 |
192 |
193 | .
194 |
195 |
196 |
197 |
198 |
199 | .
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
Trending Projects (From Explore)
212 |
213 |
214 |
215 |
216 | .
217 |
218 |
219 |
220 |
221 |
222 | .
223 |
224 |
225 |
226 |
227 |
228 |
229 | .
230 |
231 |
232 |
233 |
234 |
235 | .
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
Scratch community statistics
247 |
248 |
249 |
250 |
251 |
252 | Projects
253 |
254 |
255 |
256 |
257 |
258 | Studios
259 |
260 |
261 |
262 |
263 | Comments
264 |
265 |
266 |
267 |
268 | Users
269 |
270 |
271 |
272 |
273 |
274 |
275 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
--------------------------------------------------------------------------------
/sweetalert2.min.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var e={title:"",titleText:"",text:"",html:"",type:null,customClass:"",target:"body",animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusCancel:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onOpen:null,onClose:null,useRejections:!0},t=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","iosfix","modal","overlay","fade","show","hide","noanimation","close","title","content","buttonswrapper","confirm","cancel","icon","image","input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled"]),o=t(["success","warning","info","question","error"]),r=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",o=0;o<3;o++){var r=parseInt(e.substr(2*o,2),16);n+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return n},i=function(e){var t=[];for(var n in e)-1===t.indexOf(e[n])&&t.push(e[n]);return t},a={previousWindowKeyDown:null,previousActiveElement:null,previousBodyPadding:null},l=function(e){var t=u();t&&t.parentNode.removeChild(t);{if("undefined"!=typeof document){var o=document.createElement("div");o.className=n.container,o.innerHTML=s,("string"==typeof e.target?document.querySelector(e.target):e.target).appendChild(o);var r=c(),i=B(r,n.input),a=B(r,n.file),l=r.querySelector("."+n.range+" input"),d=r.querySelector("."+n.range+" output"),p=B(r,n.select),f=r.querySelector("."+n.checkbox+" input"),m=B(r,n.textarea);return i.oninput=function(){$.resetValidationError()},i.onkeydown=function(t){setTimeout(function(){13===t.keyCode&&e.allowEnterKey&&(t.stopPropagation(),$.clickConfirm())},0)},a.onchange=function(){$.resetValidationError()},l.oninput=function(){$.resetValidationError(),d.value=l.value},l.onchange=function(){$.resetValidationError(),l.previousSibling.value=l.value},p.onchange=function(){$.resetValidationError()},f.onchange=function(){$.resetValidationError()},m.oninput=function(){$.resetValidationError()},r}console.error("SweetAlert2 requires document to initialize")}},s=('\n
\n
\n
\n \n
\n
?
\n
!
\n
i
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n OK \n Cancel \n
\n
× \n
\n').replace(/(^|\n)\s*/g,""),u=function(){return document.body.querySelector("."+n.container)},c=function(){return u()?u().querySelector("."+n.modal):null},d=function(){return c().querySelectorAll("."+n.icon)},p=function(e){return u()?u().querySelector("."+e):null},f=function(){return p(n.title)},m=function(){return p(n.content)},v=function(){return p(n.image)},g=function(){return p(n.buttonswrapper)},h=function(){return p(n.progresssteps)},y=function(){return p(n.validationerror)},b=function(){return p(n.confirm)},w=function(){return p(n.cancel)},C=function(){return p(n.close)},k=function(e){var t=[b(),w()];e&&t.reverse();var n=Array.from(c().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return e=parseInt(e.getAttribute("tabindex")),t=parseInt(t.getAttribute("tabindex")),e>t?1:e
"),e.text||e.html){if("object"===I(e.html))if(y.innerHTML="",0 in e.html)for(var q=0;q in e.html;q++)y.appendChild(e.html[q].cloneNode(!0));else y.appendChild(e.html.cloneNode(!0));else e.html?y.innerHTML=e.html:e.text&&(y.textContent=e.text);P(y)}else L(y);e.showCloseButton?P(B):L(B),t.className=n.modal,e.customClass&&E(t,e.customClass);var V=h(),O=parseInt(null===e.currentProgressStep?$.getQueueStep():e.currentProgressStep,10);e.progressSteps.length?(P(V),T(V),O>=e.progressSteps.length&&console.warn("SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(function(t,o){var r=document.createElement("li");if(E(r,n.progresscircle),r.innerHTML=t,o===O&&E(r,n.activeprogressstep),V.appendChild(r),o!==e.progressSteps.length-1){var i=document.createElement("li");E(i,n.progressline),i.style.width=e.progressStepsDistance,V.appendChild(i)}})):L(V);for(var H=d(),N=0;N
window.innerHeight&&(a.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=N()+"px")},Q=function(){null!==a.previousBodyPadding&&(document.body.style.paddingRight=a.previousBodyPadding,a.previousBodyPadding=null)},Y=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!x(document.body,n.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",E(document.body,n.iosfix)}},_=function(){if(x(document.body,n.iosfix)){var e=parseInt(document.body.style.top,10);A(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},$=function e(){for(var t=arguments.length,o=Array(t),i=0;i0.5?0:1
36 | if(rnd===0) {
37 | document.getElementById("ad1").src = "https://scratchstats.com/ads/" + listofads[0];
38 | document.getElementById("ad1link").href = linksofads[0];
39 | } else {
40 | document.getElementById("ad1").remove();
41 | }*/
42 | /*document.getElementById("ad1").style.display = "none";*/
43 | /*window.onhashchange = function(){
44 | location.reload();
45 | };*/
46 |
47 | if(location.hash===""){
48 | userStatsUpdate("griffpatch");
49 | }
50 | else {
51 | username = location.hash.substring(1);
52 | userStatsUpdate(username);
53 | }
54 | }
55 |
56 | function newUser(){
57 | swal({
58 | title: 'Enter a Scratch Username',
59 | type: 'warning',
60 | html: ' ',
61 | showCancelButton: false,
62 | confirmButtonColor: '#3085d6',
63 | confirmButtonText: 'Get stats'
64 | }).then(function () {
65 | var username = document.getElementById('in').value;
66 | if(username.startsWith("@")){username=username.substring(1);}
67 | /*for (i = 0; i < document.getElementsByClassName("answer").length; i++) {
68 | if(i!==16)
69 | document.getElementsByClassName("answer")[i].innerText = ".";
70 | }
71 | userStatsUpdate(username);*/
72 | location.hash = username;
73 | location.reload();
74 | });
75 | document.getElementById('in').select();
76 | document.getElementById('in').focus();
77 | }
78 |
79 | function copyURL() {
80 | copyTextToClipboard("https://scratchstats.com/"+username);
81 | swal("Copied to clipboard", "", "success")
82 | }
83 |
84 | function copy(text) {
85 | copyTextToClipboard(text);
86 | }
87 |
88 | function copyTextToClipboard(text) {
89 | var textArea = document.createElement("textarea");
90 |
91 | //
92 | // *** This styling is an extra step which is likely not required. ***
93 | //
94 | // Why is it here? To ensure:
95 | // 1. the element is able to have focus and selection.
96 | // 2. if element was to flash render it has minimal visual impact.
97 | // 3. less flakyness with selection and copying which **might** occur if
98 | // the textarea element is not visible.
99 | //
100 | // The likelihood is the element won't even render, not even a flash,
101 | // so some of these are just precautions. However in IE the element
102 | // is visible whilst the popup box asking the user for permission for
103 | // the web page to copy to the clipboard.
104 | //
105 |
106 | // Place in top-left corner of screen regardless of scroll position.
107 | textArea.style.position = 'fixed';
108 | textArea.style.top = 0;
109 | textArea.style.left = 0;
110 |
111 | // Ensure it has a small width and height. Setting to 1px / 1em
112 | // doesn't work as this gives a negative w/h on some browsers.
113 | textArea.style.width = '2em';
114 | textArea.style.height = '2em';
115 |
116 | // We don't need padding, reducing the size if it does flash render.
117 | textArea.style.padding = 0;
118 |
119 | // Clean up any borders.
120 | textArea.style.border = 'none';
121 | textArea.style.outline = 'none';
122 | textArea.style.boxShadow = 'none';
123 |
124 | // Avoid flash of white box if rendered for any reason.
125 | textArea.style.background = 'transparent';
126 |
127 |
128 | textArea.value = text;
129 |
130 | document.body.appendChild(textArea);
131 |
132 | textArea.select();
133 |
134 | try {
135 | var successful = document.execCommand('copy');
136 | var msg = successful ? 'successful' : 'unsuccessful';
137 | } catch (err) {
138 | console.log('Oops, unable to copy');
139 | }
140 |
141 | document.body.removeChild(textArea);
142 | }
143 |
144 | function userStatsUpdate(user) {
145 | swal({
146 | type: "warning",
147 | title: "IMPORTANT: project info may be inaccurate because of a bug introduced by the Scratch Team",
148 | showConfirmButton: true
149 | });
150 | totalProjects = 0;
151 | offset = 0;
152 | totalViews = 0;
153 | totalLoves = 0;
154 | totalFaves = 0;
155 | totalComments = 0;
156 | mostViewedNum = -1;
157 | mostViewedLoves = -1;
158 | mostViewedFaves = -1;
159 | mostViewedComments = -1;
160 | mostViewedLikes = -1;
161 | mostLovedNum = -1;
162 | mostLovedViews = -1;
163 | mostLovedFaves = -1;
164 | mostLovedLikes = -1;
165 | mostLovedComments = -1;
166 | mostCommentedNum = -1;
167 | mostCommentedViews = -1;
168 | mostCommentedLoves = -1;
169 | mostCommentedLikes = -1;
170 | mostComentedFaves = -1;
171 | mostLikedNum = -1;
172 | mostLikedViews = -1;
173 | mostLikedFaves = -1;
174 | mostLikedLoves = -1;
175 | mostLikedComments = -1;
176 | username = user;
177 | document.getElementById("reactions").contentWindow.location.replace("https://emojireact.com/embed?emojis=grinning,joy,open_mouth,slight_smile,thumbsup&url="+"scratchstats.cf/"+username);
178 | sendAPIreq();
179 | messageCount();
180 | document.getElementById("year").onchange=averagePer;
181 | }
182 |
183 | // SendAPIreq -> getIcon & getID & getJoinDate & followers
184 | // Followers -> avgFollows
185 | // getJoinDate -> projectStats -> activity & averagePer
186 |
187 | //
188 | function sendAPIreq(){
189 | var xmlhttp = new XMLHttpRequest();
190 | xmlhttp.open('GET', 'https://cors.io/?https://api.scratch.mit.edu/users/' + username + "?" + Math.floor(Date.now() / 1000), true);
191 | xmlhttp.send();
192 | xmlhttp.onreadystatechange = function() {
193 | if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
194 | var response = xmlhttp.responseText;
195 | getIcon(response);
196 | getID(response);
197 | getJoinDate(response);
198 | getCountryFlag(response);
199 | }
200 | if (xmlhttp.readyState === 4 && xmlhttp.status === 404) {
201 | newUser();
202 | }
203 | };
204 | }
205 |
206 | function getIcon(response){ // ga.js and username
207 | var obj = JSON.parse(response);
208 | var src= 'https://cdn2.scratch.mit.edu/get_image/user/'+obj.id+'_60x60.png';
209 | document.getElementById('icon').src = src;
210 | document.getElementById('user').innerHTML = obj.username;
211 | username = obj.username;
212 | shouldrefresh = 0;
213 | /*location.hash = username;*/
214 | ga('set', 'page', '/user/#'+obj.username);
215 | ga('send', 'pageview');
216 | }
217 |
218 | function getID(response){
219 | var obj = JSON.parse(response);
220 | document.getElementById('id').innerHTML = obj.id;
221 | }
222 |
223 | function getJoinDate(response){
224 | var obj = JSON.parse(response);
225 | document.getElementById("joined").innerHTML = (obj.history.joined).substring(0, obj.history.joined.indexOf('T')) + " " + obj.history.joined.substring(11,19) + " (" + moment(new Date(obj.history.joined).valueOf()).fromNow() + ") ";
226 | divideperyear = (Math.floor(Date.now() / 1000)-new Date(obj.history.joined).valueOf()/1000)/31556952
227 | projectStats();
228 | }
229 |
230 | function getCountryFlag(response){
231 | var country = JSON.parse(response).profile.country;
232 | var xmlhttp = new XMLHttpRequest();
233 | xmlhttp.open('GET','https://restcountries.eu/rest/v2/name/'+country,true);
234 | xmlhttp.send();
235 | xmlhttp.onreadystatechange = function () {
236 | if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
237 | var response = JSON.parse(xmlhttp.responseText);
238 | document.getElementById("flag").innerHTML=" ";
239 | document.getElementById("flagquestion").innerHTML= "Country: "+response[response.length-1].alpha2Code;
240 | }
241 | if (xmlhttp.readyState === 4 && xmlhttp.status === 404) {
242 | document.getElementById("flag").innerHTML="?";
243 | };
244 | };
245 | }
246 |
247 | function messageCount() {
248 | var xmlhttp = new XMLHttpRequest();
249 | xmlhttp.open('GET','https://cors.io/?https://api.scratch.mit.edu/proxy/users/'+username+'/activity/count',true);
250 | xmlhttp.send();
251 | xmlhttp.onreadystatechange = function () {
252 | if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
253 | var response = xmlhttp.responseText;
254 | var obj = JSON.parse(response);
255 | messageCountVar = c(obj.msg_count);
256 | document.getElementById('messageCount').innerHTML = messageCountVar;
257 | }
258 | };
259 | }
260 |
261 | function activity() {
262 | var activity = new XMLHttpRequest();
263 | activity.open('GET', 'https://cors.io/?https://scratch.mit.edu/messages/ajax/user-activity/?user=' + username + '&max=1000000', true);
264 | activity.send();
265 | activity.onreadystatechange = function() {
266 | if (activity.readyState === 4 && activity.status === 200) {
267 | var responseactivity = activity.responseText;
268 | var countloves = (responseactivity.match(/icon-xs black love/g) || []).length;
269 | var countfaves = (responseactivity.match(/icon-xs black favorite/g) || []).length;
270 | var countstudiofollows = (responseactivity.match(/is now following the studio/g) || []).length;
271 | var countfollows = (responseactivity.match(/is now following/g) || []).length-countstudiofollows;
272 | var countcurations = (responseactivity.match(/became a curator of/g) || []).length;
273 | var countshares = (responseactivity.match(/shared the project/g) || []).length;
274 | var countactivity = (responseactivity.match(//g) || []).length;
275 |
276 |
277 | document.getElementById("amtLoved").innerHTML = (countloves===20?"20+":countloves)+"💖 ";
278 | document.getElementById("amtFaved").innerHTML = (countfaves===20?"20+":countfaves)+"⭐ ";
279 | document.getElementById("amtActivity").innerHTML = countactivity===20?"20+":countactivity;
280 |
281 | document.getElementById("amtFollowed").innerHTML = countfollows===20?"20+":countfollows;
282 | document.getElementById("amtStudiosFollowed").innerHTML = countstudiofollows===20?"20+":countstudiofollows;
283 | document.getElementById("amtCurated").innerHTML = countcurations===20?"20+":countcurations;
284 | document.getElementById("amtShared").innerHTML = countshares===20?"20+":countshares;
285 | }};
286 | }
287 |
288 | function projectStats() {
289 | document.getElementById("projectstable").style.display = "";
290 | var xmlhttp = new XMLHttpRequest();
291 | xmlhttp.open('GET', 'https://cors.io/?https://api.scratch.mit.edu/users/' + username + "/projects?limit=40&offset=" + offset, true);
292 | xmlhttp.send();
293 | xmlhttp.onreadystatechange = function() {
294 | if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
295 | var parsedJSON = JSON.parse(xmlhttp.responseText);
296 |
297 | if (parsedJSON.length === 0 & offset === 0) {
298 | document.getElementById("projectstable").style.display = "none";
299 | activity();
300 | return;}
301 |
302 | var i = 0;
303 |
304 | if(parsedJSON.length>0) {
305 | lastProject = parsedJSON[parsedJSON.length-1].id;
306 | lastProject2 = parsedJSON.length!==1?parsedJSON[parsedJSON.length-2].id:0;
307 | }
308 |
309 | while(i < parsedJSON.length) {
310 | // Views
311 | totalViews = totalViews + Number(parsedJSON[i].stats.views);
312 | if (Number(parsedJSON[i].stats.views)>mostViewedNum) {
313 | mostViewedID = parsedJSON[i].id;
314 | mostViewedTitle = parsedJSON[i].title.substring(0,21)
315 | mostViewedNum = parsedJSON[i].stats.views;
316 | mostViewedImg = parsedJSON[i].image;
317 | mostViewedFaves = parsedJSON[i].stats.favorites;
318 | mostViewedLoves = parsedJSON[i].stats.loves;
319 | mostViewedComments = parsedJSON[i].stats.comments;
320 | mostViewedLikes = Number(parsedJSON[i].stats.loves)/Number(parsedJSON[i].stats.views)*100;
321 | mostViewedLikes = mostViewedLikes.toFixed();
322 | }
323 | //
324 | // Loves
325 | totalLoves = totalLoves + Number(parsedJSON[i].stats.loves);
326 | if (Number(parsedJSON[i].stats.loves)>mostLovedNum) {
327 | mostLovedID = parsedJSON[i].id;
328 | mostLovedTitle = parsedJSON[i].title.substring(0,21)
329 | mostLovedNum = parsedJSON[i].stats.loves;
330 | mostLovedImg = parsedJSON[i].image;
331 | mostLovedFaves = parsedJSON[i].stats.favorites;
332 | mostLovedViews = parsedJSON[i].stats.views;
333 | mostLovedComments = parsedJSON[i].stats.comments;
334 | mostLovedLikes = Number(parsedJSON[i].stats.loves)/Number(parsedJSON[i].stats.views)*100;
335 | mostLovedLikes = mostLovedLikes.toFixed();
336 | }
337 | //
338 | // Faves
339 | totalFaves = totalFaves + Number(parsedJSON[i].stats.favorites);
340 | //
341 | // Comments
342 | totalComments = totalComments + Number(parsedJSON[i].stats.comments);
343 | if (Number(parsedJSON[i].stats.comments)>mostCommentedNum) {
344 | mostCommentedID = parsedJSON[i].id;
345 | mostCommentedTitle = parsedJSON[i].title.substring(0,21)
346 | mostCommentedNum = parsedJSON[i].stats.comments;
347 | mostCommentedImg = parsedJSON[i].image;
348 | mostCommentedFaves = parsedJSON[i].stats.favorites;
349 | mostCommentedViews = parsedJSON[i].stats.views;
350 | mostCommentedLoves = parsedJSON[i].stats.loves;
351 | mostCommentedLikes = Number(parsedJSON[i].stats.loves)/Number(parsedJSON[i].stats.views)*100;
352 | mostCommentedLikes = mostCommentedLikes.toFixed();
353 | }
354 | //
355 | // Love-View ratio
356 | var ratio = Number(parsedJSON[i].stats.loves)/Number(parsedJSON[i].stats.views)*100;
357 | if (ratio>mostLikedNum) {
358 | mostLikedID = parsedJSON[i].id;
359 | mostLikedTitle = parsedJSON[i].title.substring(0,21)
360 | mostLikedNum = Number(parsedJSON[i].stats.loves)/Number(parsedJSON[i].stats.views)*100;
361 | mostLikedNum = mostLikedNum.toFixed();
362 | mostLikedImg = parsedJSON[i].image;
363 | mostLikedFaves = parsedJSON[i].stats.favorites;
364 | mostLikedViews = parsedJSON[i].stats.views;
365 | mostLikedLoves = parsedJSON[i].stats.loves;
366 | mostLikedComments = parsedJSON[i].stats.comments;
367 | }
368 | //
369 | totalProjects++;
370 | i++;
371 | }
372 |
373 | if (parsedJSON.length === 40) {
374 | offset = offset+40;
375 | setTimeout(function(){projectStats(); }, /*200*/0);}
376 | else {
377 | showProjectStats();
378 | getBrowser(lastProject,lastProject2);
379 | }
380 | }};
381 | }
382 |
383 | function showProjectStats(){
384 |
385 | activity();
386 | averagePer();
387 |
388 | document.getElementById("mostLoved").innerHTML = ""+mostLovedTitle+" 💖"+c(mostLovedNum)+" ⭐"+c(mostLovedFaves)+" 👍"+mostLovedLikes+"% 👁️"+c(mostLovedViews)+" 💬"+c(mostLovedComments)+"
";
389 | document.getElementById("mostLiked").innerHTML = ""+mostLikedTitle+" 💖"+c(mostLikedLoves)+" ⭐"+c(mostLikedFaves)+" 👍"+mostLikedNum+"% 👁️"+c(mostLikedViews)+" 💬"+c(mostLikedComments)+"
";
390 | document.getElementById("mostViewed").innerHTML = ""+mostViewedTitle+" 💖"+c(mostViewedLoves)+" ⭐"+c(mostViewedFaves)+" 👍"+mostViewedLikes+"% 👁️"+c(mostViewedNum)+" 💬"+c(mostViewedComments)+"
";
391 | document.getElementById("mostCommented").innerHTML = ""+mostCommentedTitle+" 💖"+c(mostCommentedLoves)+" ⭐"+c(mostCommentedFaves)+" 👍"+mostCommentedLikes+"% 👁️"+c(mostCommentedViews)+" 💬"+c(mostCommentedNum)+"
";
392 |
393 | averageLoves = totalLoves/totalProjects;
394 | averageFaves = totalFaves/totalProjects;
395 | averageViews = totalViews/totalProjects;
396 | averageComments = totalComments/totalProjects;
397 | averageLikes = Number(totalLoves)/Number(totalViews)*100;
398 |
399 | document.getElementById("averageLoves").innerHTML = "💖 " + c(averageLoves.toFixed());
400 | document.getElementById("averageFaves").innerHTML = "⭐ " + c(averageFaves.toFixed());
401 | document.getElementById("averageViews").innerHTML = "👁️ " + c(averageViews.toFixed());
402 | document.getElementById("averageCommented").innerHTML = "💬 " + c(averageComments.toFixed());
403 | document.getElementById("averageLiked").innerHTML = "👍 " + c(averageLikes.toFixed())+"%";
404 | }
405 |
406 | function averagePer() {
407 |
408 |
409 | if(divideperyear<1&&document.getElementById("yearoption")){document.getElementById("yearoption").style.display = "none";}
410 | if(divideperyear<0.083&&document.getElementById("monthoption")){document.getElementById("monthoption").style.display = "none";}
411 |
412 | lovesPerYear = totalLoves/divideperyear;
413 | lovesPerYear = c(lovesPerYear.toFixed());
414 | favesPerYear = totalFaves/divideperyear;
415 | favesPerYear = c(favesPerYear.toFixed());
416 | viewsPerYear = totalViews/divideperyear;
417 | viewsPerYear = c(viewsPerYear.toFixed());
418 | commentsPerYear = totalComments/divideperyear;
419 | commentsPerYear = c(commentsPerYear.toFixed());
420 |
421 | lovesPerMonth = totalLoves/divideperyear/12;
422 | lovesPerMonth = c(lovesPerMonth.toFixed());
423 | favesPerMonth = totalFaves/divideperyear/12;
424 | favesPerMonth = c(favesPerMonth.toFixed());
425 | viewsPerMonth = totalViews/divideperyear/12;
426 | viewsPerMonth = c(viewsPerMonth.toFixed());
427 | commentsPerMonth = totalComments/divideperyear/12;
428 | commentsPerMonth = c(commentsPerMonth.toFixed());
429 |
430 | lovesPerDay = totalLoves/divideperyear/12/30.44;
431 | lovesPerDay = c(lovesPerDay.toFixed());
432 | favesPerDay = totalFaves/divideperyear/12/30.44;
433 | favesPerDay = c(favesPerDay.toFixed());
434 | viewsPerDay = totalViews/divideperyear/12/30.44;
435 | viewsPerDay = c(viewsPerDay.toFixed());
436 | commentsPerDay = totalComments/divideperyear/12/30.44;
437 | commentsPerDay = c(commentsPerDay.toFixed());
438 |
439 | if(document.getElementById("year").value==="year"){
440 | document.getElementById("averageTotalLoves").innerHTML = "💖 " + lovesPerYear;
441 | document.getElementById("averageTotalFaves").innerHTML = "⭐ " + favesPerYear;
442 | document.getElementById("averageTotalViews").innerHTML = "👁️ " + viewsPerYear;
443 | document.getElementById("averageTotalCommented").innerHTML = "💬 " + commentsPerYear;
444 | }
445 |
446 | if(document.getElementById("year").value==="month"){
447 | document.getElementById("averageTotalLoves").innerHTML = "💖 " + lovesPerMonth;
448 | document.getElementById("averageTotalFaves").innerHTML = "⭐ " + favesPerMonth;
449 | document.getElementById("averageTotalViews").innerHTML = "👁️ " + viewsPerMonth;
450 | document.getElementById("averageTotalCommented").innerHTML = "💬 " + commentsPerMonth;
451 | }
452 |
453 | if(document.getElementById("year").value==="day"){
454 | document.getElementById("averageTotalLoves").innerHTML = "💖 " + lovesPerDay;
455 | document.getElementById("averageTotalFaves").innerHTML = "⭐ " + favesPerDay;
456 | document.getElementById("averageTotalViews").innerHTML = "👁️ " + viewsPerDay;
457 | document.getElementById("averageTotalCommented").innerHTML = "💬 " + commentsPerDay;
458 | }
459 |
460 | if(document.getElementById("year").value==="total"){
461 | document.getElementById("averageTotalLoves").innerHTML = "💖 " + c(totalLoves);
462 | document.getElementById("averageTotalFaves").innerHTML = "⭐ " + c(totalFaves);
463 | document.getElementById("averageTotalViews").innerHTML = "👁️ " + c(totalViews);
464 | document.getElementById("averageTotalCommented").innerHTML = "💬 " + c(totalComments);
465 | }
466 |
467 | }
468 |
469 | function getBrowser(id,id2){
470 | checkua = new XMLHttpRequest();
471 | checkua.open("GET", 'https://cdn.projects.scratch.mit.edu/internalapi/project/' + id + '/get/', true);
472 | checkua.send();
473 | checkua.onreadystatechange = function() {
474 | if (checkua.readyState === 4 && checkua.status === 200) {
475 | useragent = JSON.parse(checkua.responseText).info.userAgent;
476 | if(useragent===undefined){
477 | if(id2!==0)getBrowser(id2,0);
478 | document.getElementById("browser").innerHTML = "?";
479 | os = "?";
480 | return;
481 | }
482 | getinfo = new XMLHttpRequest();
483 | getinfo.open("GET", 'https://helloacm.com/api/parse-user-agent/?s=' + encodeURI(useragent), true);
484 | getinfo.send();
485 | getinfo.onreadystatechange = function() {
486 | if (getinfo.readyState === 4 && getinfo.status === 200) {
487 | document.getElementById("browser").innerHTML = JSON.parse(getinfo.responseText).browser;
488 | getinfo = new XMLHttpRequest();
489 | getinfo.open("GET", 'https://cors-anywhere.herokuapp.com/http://www.useragentstring.com/?uas=' + encodeURI(useragent) + "&getJSON=os_name", true);
490 | getinfo.send();
491 | getinfo.onreadystatechange = function() {
492 | if (getinfo.readyState === 4 && getinfo.status === 200) {
493 | os = JSON.parse(getinfo.responseText).os_name;
494 | document.getElementById("OS").innerHTML = os;
495 | }
496 | };
497 | }
498 | }
499 | };
500 | };
501 | }
502 |
503 | function c(x) { // Add comma
504 | return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
505 | }
506 |
507 | function captchaDone(){
508 | setTimeout(function(){
509 | document.getElementById("lastRowLoading").style.display = "none";
510 | document.getElementById("lastRow").style.display = "";
511 | document.getElementById("captchaRow").style.display = "none";
512 | },1000);
513 | }
514 |
515 | function loadClick() {
516 | document.getElementById("lastRowLoading").style.display = "none";
517 | document.getElementById("lastRow").style.display = "";
518 | document.getElementById("captchaRow").style.display = "none";
519 | }
520 |
--------------------------------------------------------------------------------