├── ads.js ├── CNAME ├── images ├── icon.png ├── logo.png └── favicon.ico ├── 404.html ├── README.md ├── .github ├── LICENSE.md └── CODE_OF_CONDUCT.md ├── modal.css ├── about.html ├── index.css ├── donate.html ├── sweetalert2.min.css ├── index.html ├── global-stats.html ├── sweetalert2.min.js └── index.js /ads.js: -------------------------------------------------------------------------------- 1 | // 2 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | old.scratchstats.com -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scratchuserstats/scratchstats/HEAD/images/icon.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scratchuserstats/scratchstats/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scratchuserstats/scratchstats/HEAD/images/favicon.ico -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

Scratchstats

3 |

The Official Code Repository for ScratchStats.com

4 | 5 | 6 | ### About 7 | https://scratchstats.com is a free tool that uses the Scratch API to create a list of more than 50 statistics based on Scratch. These statistics range from user-based statistics (such as how much followers a user has), to global statistics (such as who has the most followers). 8 | -------------------------------------------------------------------------------- /.github/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-2018 ScratchStats.cf 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /modal.css: -------------------------------------------------------------------------------- 1 | /* The Modal (background) */ 2 | a:active, a:hover { 3 | color: white; 4 | transition: all 0.5s ease; 5 | } 6 | a { 7 | text-decoration: none; 8 | color: white; 9 | transition: all 0.5s ease; 10 | } 11 | .modal { 12 | display: none; /* Hidden by default */ 13 | position: fixed; /* Stay in place */ 14 | z-index: 1; /* Sit on top */ 15 | padding-top: 100px; /* Location of the box */ 16 | left: 0; 17 | top: 0; 18 | width: 100%; /* Full width */ 19 | height: 100%; /* Full height */ 20 | overflow: auto; /* Enable scroll if needed */ 21 | background-color: rgb(0,0,0); /* Fallback color */ 22 | background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ 23 | } 24 | 25 | /* Modal Content */ 26 | .modal-content { 27 | position: relative; 28 | background-color: #fefefe; 29 | margin: auto; 30 | padding: 0; 31 | border: 1px solid #888; 32 | width: 80%; 33 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); 34 | -webkit-animation-name: animatetop; 35 | -webkit-animation-duration: 0.4s; 36 | animation-name: animatetop; 37 | animation-duration: 0.4s 38 | } 39 | 40 | /* Add Animation */ 41 | @-webkit-keyframes animatetop { 42 | from {top:-300px; opacity:0} 43 | to {top:0; opacity:1} 44 | } 45 | 46 | @keyframes animatetop { 47 | from {top:-300px; opacity:0} 48 | to {top:0; opacity:1} 49 | } 50 | 51 | /* The Close Button */ 52 | .close { 53 | color: white; 54 | float: right; 55 | font-size: 28px; 56 | font-weight: bold; 57 | } 58 | 59 | .close:hover, 60 | .close:focus { 61 | color: #000; 62 | text-decoration: none; 63 | cursor: pointer; 64 | } 65 | 66 | .modal-header { 67 | padding: 2px 16px; 68 | background-color: #25aff4; 69 | color: white; 70 | } 71 | 72 | .modal-body {padding: 2px 16px;} 73 | 74 | .modal-footer { 75 | padding: 2px 16px; 76 | background-color: orange; 77 | color: white; 78 | } 79 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | Contributor Covenant Code of Conduct 2 | Our Pledge 3 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 4 | 5 | Our Standards 6 | Examples of behavior that contributes to creating a positive environment include: 7 | 8 | Using welcoming and inclusive language 9 | Being respectful of differing viewpoints and experiences 10 | Gracefully accepting constructive criticism 11 | Focusing on what is best for the community 12 | Showing empathy towards other community members 13 | Examples of unacceptable behavior by participants include: 14 | 15 | The use of sexualized language or imagery and unwelcome sexual attention or advances 16 | Trolling, insulting/derogatory comments, and personal or political attacks 17 | Public or private harassment 18 | Publishing others' private information, such as a physical or electronic address, without explicit permission 19 | Other conduct which could reasonably be considered inappropriate in a professional setting 20 | Our Responsibilities 21 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 22 | 23 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 24 | 25 | Scope 26 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 27 | 28 | Attribution 29 | This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4 30 | -------------------------------------------------------------------------------- /about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | About | ScratchStats.com 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 55 |
56 |
57 |
58 |
59 |
60 | 61 |
62 |
63 |

About ScratchStats.com

64 |

65 | ScratchStats.com is a free tool that uses the Scratch API to create 66 | a list of more than 50 statistics based on Scratch. These statistics range from user-based statistics, to global statistics. You can find the code here. 67 |
68 |

69 |
70 |
71 |
72 |

73 |
74 | 75 |
76 |

Credits


77 |
These are the people who took so much time and effort out of their own time to create this website for you.
78 |
79 | 80 | 81 | 85 | 89 |
82 |
83 | 84 |
86 |
87 | 88 |
90 |
91 |
92 |
93 |
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 | Donate | ScratchStats.com 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 55 |
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 | 94 | 98 | 99 |
91 |
92 | 93 |
95 |
96 | 97 |
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 | 58 |
59 |
60 |
61 |
62 | 63 |
Get an ad here by donating. 64 |

65 |
66 | 67 |

Loading...

68 |
69 | 70 | 71 |
72 |
73 |
74 |   75 |   76 |
77 |
78 |
79 |
80 |
81 |

Average project stats

82 | 83 |
84 |
85 | 86 | 89 | 92 | 95 | 98 | 102 | 103 |
87 |
.
88 |
90 |
.
91 |
93 |
.
94 |
96 |
.
97 |
99 |
.
100 |
Love To View Ratio
101 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |

Best project per stat

111 |
112 |
113 | 114 | 118 | 122 | 126 | 130 | 134 | 135 |
115 |
.
116 |
Most 💖/⭐ Project
117 |
123 |
.
124 |
Most 👍 Project
125 |
127 |
.
128 |
Most 👁️ Project
129 |
131 |
.
132 |
Most 💬 Project
133 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |

143 | 149 | Amount per stat

150 | 151 |
152 |
153 | 154 | 157 | 160 | 163 | 166 | 167 |
155 |
.
156 |
158 |
.
159 |
161 |
.
162 |
164 |
.
165 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |

Activity by the user last 12 months

175 |
176 |
177 | 178 | 181 | 184 | 188 | 192 | 196 | 200 | 204 |
179 |
.
180 |
182 |
.
183 |
185 |
.
186 |
Users Followed
187 |
189 |
.
190 |
Studios Followed
191 |
193 |
.
194 |
New Studios Curated
195 |
197 |
.
198 |
New Projects Shared
199 |
201 |
.
202 |
Total Activity Actions
203 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |

Miscellaneous

212 |
213 |
214 | 215 | 219 | 223 | 227 |
216 |
.
217 |
Join Date (UTC)
218 |
220 |
.
221 |
ID Number
222 |
224 |
.
225 |
Country
226 |
228 | 229 | 233 | 237 | 241 |
230 |
.
231 |
Current Message Count
232 |
234 |
.
235 |
Browser
236 |
238 |
.
239 |
Operating System
240 |
242 | 243 | 247 | 251 | 255 | 256 | 257 | 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 | 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 | 184 | 190 | 197 | 203 | 204 |
180 |
.
181 |
182 |
183 |
185 |
186 |
.
187 |
188 |
189 |
191 |
192 | 193 |
.
194 |
195 |
196 |
198 |
199 |
.
200 |
201 |
202 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |

Trending Projects (From Explore)

212 |
213 |
214 | 215 | 220 | 226 | 233 | 239 | 240 |
216 |
.
217 |
218 |
219 |
221 |
222 |
.
223 |
224 |
225 |
227 |
228 | 229 |
.
230 |
231 |
232 |
234 |
235 |
.
236 |
237 |
238 |
241 |
242 |
243 | 244 |


245 |
246 |

Scratch community statistics

247 |
248 |
249 | 250 | 255 | 261 | 265 | 266 | 270 | 271 |
251 |
252 |
Projects
253 |
254 |
256 |
257 |
258 |
Studios
259 |
260 |
262 |
263 |
Comments
264 |
267 |
268 |
Users
269 |
272 |
273 |
274 |


275 |
276 |

Scratch website traffic last month

277 |
278 |
279 | 280 | 285 | 291 | 295 | 296 |
281 |
282 |
Pageviews
283 |
284 |
286 |
287 |
288 |
Unique visitors
289 |
290 |
292 |
293 |
Visits
294 |
297 |
298 |
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').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;Nwindow.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 | --------------------------------------------------------------------------------