1if (document.getElementById("full-report")) { 2 function addCommas(number) { 3 // Convert the number to a string 4 let numStr = number.toString(); 5 6 // Use a regular expression to add commas every three digits 7 numStr = numStr.replace(/\B(?=(\d{3})+(?!\d))/g, ","); 8 9 return numStr; 10 } 11 12 getLogo("black"); 13 14 document.getElementById("full-report-scrobbles").innerHTML = addCommas( 15 dummyData.scrobble_stats.total_scrobbles 16 ); 17 document.getElementById("full-report-artists").innerHTML = addCommas( 18 dummyData.catalogue_items.artists.total 19 ); 20 document.getElementById("full-report-albums").innerHTML = addCommas( 21 dummyData.catalogue_items.albums.total 22 ); 23 document.getElementById("full-report-tracks").innerHTML = addCommas( 24 dummyData.catalogue_items.tracks.total 25 ); 26 27 var frTopArtists = ""; 28 if (dummyData.top_item_charts && dummyData.top_item_charts.top_artists) { 29 dummyData.top_item_charts.top_artists.slice(0, 5).forEach((element) => { 30 frTopArtists += "<p>" + element.name + "</p>"; 31 }); 32 document.getElementById("full-report-top-artists").innerHTML = frTopArtists; 33 } 34 35 var frTopAlbums = ""; 36 if (dummyData.top_item_charts && dummyData.top_item_charts.top_albums) {
37 dummyData.top_item_charts.top_albums.slice(0, 5).forEach((element) => { 38 frTopAlbums += "<p>" + element.name + "</p>"; 39 }); 40 document.getElementById("full-report-top-albums").innerHTML = frTopAlbums; 41 } 42 43 var frTopTracks = ""; 44 if (dummyData.top_item_charts && dummyData.top_item_charts.top_tracks) { 45 dummyData.top_item_charts.top_tracks.slice(0, 5).forEach((element) => { 46 frTopTracks += "<p>" + element.name + "</p>"; 47 }); 48 document.getElementById("full-report-top-tracks").innerHTML = frTopTracks; 49 } 50 51 var frTopTags = ""; 52 if (dummyData.top_tags && dummyData.top_tags) { 53 dummyData.top_tags[0].forEach((element) => { 54 frTopTags += 55 "<p style='text-transform: capitalize'>" + element.name + "</p>"; 56 }); 57 document.getElementById("full-report-top-tags").innerHTML = frTopTags; 58 } 59 60 function getSecondaryColor(color) { 61 var secondaryColor = "#FFACAC"; 62 switch (color) { 63 case "ice": 64 secondaryColor = "#8A2BE2"; 65 break; 66 case "sunny": 67 secondaryColor = "#D6009F"; 68 break; 69 case "green": 70 secondaryColor = "#FFC4B1"; 71 break; 72 case "deep-purple": 73 secondaryColor = "#FFB6E2"; 74 break; 75 case "orange": 76 secondaryColor = "#ffffff"; 77 break; 78 case "black": 79 secondaryColor = "#FFACAC"; 80 break; 81 } 82 return secondaryColor; 83 } 84 85 function getLogo(color) { 86 var secondaryColor = getSecondaryColor(color); 87 88 document.getElementById("play-back-logo").innerHTML = 89 '<svg width="370" height="39" viewBox="0 0 370 39" fill="none" xmlns="http://www.w3.org/2000/svg">' + 90 '<path d="M0 1.15248H5.62779V30.6568C5.62779 32.1689 6.38142 32.9226 7.86912 32.9226L9.56235 32.624V37.1312C7.68805 37.4982 6.56738 37.7037 6.20035 37.7037C4.32606 37.7037 2.81389 37.2241 1.69323 36.2846C0.572566 35.3498 0 33.9502 0 32.0759L0 1.15248ZM15.1901 15.3541C17.2504 13.0002 20.2454 11.8306 24.1799 11.8306C27.7474 11.8306 30.5173 12.5402 32.4846 13.9349C34.4519 15.3541 35.9836 17.8254 37.1043 21.3929L39.0715 26.7222C40.3977 31.2293 43.3927 33.4707 48.0858 33.4707C51.8148 33.4707 53.6891 32.536 53.6891 30.6568C53.6891 29.1691 52.4755 28.0484 50.0531 27.2948L46.3926 26.4482C42.0714 25.3275 39.9181 22.9932 39.9181 19.4257C39.9181 14.3704 43.0991 11.8306 49.4805 11.8306C55.4753 11.8306 58.5633 14.0719 58.7688 18.579L53.4151 19.1516C53.4151 17.0914 52.0203 16.0392 49.2064 16.0392C46.7596 16.0392 45.5459 16.9739 45.5459 18.8531C45.5459 19.7878 45.727 20.4974 46.1185 20.9574C46.4855 21.437 47.3321 21.76 48.6339 21.941L52.0203 22.7877C56.6841 23.9083 59.0428 26.4482 59.0428 30.3827C59.0428 35.4379 55.2894 37.9778 47.7873 37.9778C43.4857 37.9778 40.3096 37.1312 38.2494 35.4379C36.1696 33.7692 34.5889 31.4104 33.4682 28.4154L31.775 23.0862C31.2024 20.8204 30.3803 19.1076 29.2351 17.8695C28.1145 16.6558 26.4212 16.0392 24.1799 16.0392C22.4867 16.0392 20.999 16.7928 19.6973 18.305C18.3711 19.7927 17.73 22.0585 17.73 25.0534C17.73 27.6618 18.2781 29.7221 19.3987 31.2293C20.5194 32.7415 22.0267 33.4707 23.9059 33.4707C25.5991 33.4707 27.0868 33.0596 28.3885 32.213C29.7147 31.3664 30.5613 30.7742 30.9284 30.3827L32.8956 35.1639C32.8956 35.345 32.005 35.8735 30.2188 36.7201C28.4326 37.5422 26.2402 37.9778 23.6318 37.9778C19.8783 37.9778 17.0204 36.9012 15.0531 34.7528C13.0858 32.58 12.1022 29.448 12.1022 25.3275C12.1022 21.207 13.1299 17.6884 15.1901 15.3541ZM61.2793 12.4032H64.9398V7.05431L70.5676 6.2077V12.4081H77.8641V16.8907H70.5676V29.267C70.5676 31.8949 71.5953 33.2015 73.6555 33.2015C74.9572 33.2015 76.3764 32.7464 77.8641 31.8068L78.9848 36.2894C77.316 37.4101 75.0502 37.9827 72.2363 37.9827C69.995 37.9827 68.2088 37.3661 66.9071 36.1524C65.6053 34.9388 64.9398 33.1085 64.9398 30.6617V16.8907H61.2793V12.4081V12.4032ZM84.0596 30.6568C84.7936 29.9276 85.7283 29.5361 86.849 29.5361C87.9697 29.5361 88.9093 29.9227 89.6629 30.6568C90.4165 31.4104 90.7836 32.35 90.7836 33.4707C90.7836 34.5913 90.4165 35.575 89.6629 36.4216C88.9093 37.2682 87.9941 37.7037 86.849 37.7037C85.7039 37.7037 84.7887 37.2682 84.0596 36.4216C83.306 35.575 82.9145 34.5913 82.9145 33.4707C82.9145 32.35 83.3011 31.4104 84.0596 30.6568ZM93.0494 12.4032H96.6854V9.86332C96.6854 3.8685 99.6804 0.873535 105.7 0.873535C107.941 0.873535 109.815 1.24056 111.303 1.9942L110.182 6.77537C109.248 6.02174 107.941 5.65471 106.248 5.65471C103.62 5.65471 102.313 7.1424 102.313 10.1374V12.4032H108.788V16.8858H102.313V37.4052H96.6854V16.8858H93.0494V12.4032ZM111.597 12.4032H116.079L116.926 17.1843C117.865 13.6168 120.4 11.8306 124.521 11.8306C128.641 11.8306 130.697 13.6168 131.269 17.1843C132.571 13.6168 135.204 11.8306 139.139 11.8306C144.008 11.8306 146.435 14.3704 146.435 19.4257V37.4052H140.832V21.3929C140.832 18.212 139.599 16.6118 137.171 16.6118C133.604 16.6118 131.817 18.765 131.817 23.0862V37.4052H126.214V21.3929C126.214 18.212 124.888 16.6118 122.28 16.6118C120.772 16.6118 119.559 17.1403 118.619 18.168C117.684 19.1957 117.2 20.8204 117.2 23.0862V37.4052H111.597V12.4032Z" fill="' + 91 secondaryColor + 92 '"/>' + 93 '<path d="M178.138 2.64967C179.757 3.58395 181.006 4.90674 181.894 6.60879C182.782 8.31084 183.226 10.2534 183.226 12.4457C183.226 14.638 182.782 16.5066 181.894 18.1531C181.006 19.7997 179.757 21.0762 178.138 21.9828C176.52 22.8893 174.67 23.3333 172.588 23.3333H166.964C166.788 23.3333 166.705 23.4166 166.705 23.5923
93V37.144C166.705 37.3197 166.64 37.4677 166.52 37.588C166.4 37.7083 166.252 37.773 166.076 37.773H159.98C159.804 37.773 159.656 37.7083 159.536 37.588C159.416 37.4677 159.351 37.3197 159.351 37.144V1.86339C159.351 1.68764 159.407 1.53963 159.536 1.41938C159.656 1.29913 159.804 1.23438 159.98 1.23438H172.588C174.67 1.23438 176.52 1.70614 178.138 2.64042V2.64967ZM174.651 16.1736C175.465 15.2856 175.872 14.1015 175.872 12.603C175.872 11.1044 175.465 9.85564 174.651 8.95836C173.837 8.05184 172.745 7.60782 171.395 7.60782H166.964C166.788 7.60782 166.705 7.69107 166.705 7.86683V17.2466C166.705 17.4224 166.788 17.5056 166.964 17.5056H171.395C172.745 17.5056 173.837 17.0616 174.651 16.1736Z" fill="' + 94 secondaryColor + 95 '"/>' + 96 '<path d="M187.359 37.5879C187.239 37.4677 187.174 37.3197 187.174 37.1439V1.91881C187.174 1.74306 187.23 1.59505 187.359 1.4748C187.48 1.35455 187.628 1.28979 187.803 1.28979H193.899C194.075 1.28979 194.223 1.35455 194.343 1.4748C194.464 1.59505 194.528 1.74306 194.528 1.91881V31.2145C194.528 31.3902 194.612 31.4735 194.787 31.4735H208.755C208.931 31.4735 209.079 31.5382 209.199 31.6585C209.32 31.7787 209.384 31.9267 209.384 32.1025V37.1624C209.384 37.3382 209.32 37.4862 209.199 37.6064C209.079 37.7267 208.931 37.7914 208.755 37.7914H187.803C187.628 37.7914 187.48 37.7267 187.359 37.6064V37.5879Z" fill="' + 97 secondaryColor + 98 '"/>' + 99 '<path d="M232.631 37.2549L231.429 32.1488C231.392 32.01 231.309 31.936 231.17 31.936H221.42C221.281 31.936 221.198 32.01 221.161 32.1488L219.959 37.2549C219.857 37.6064 219.626 37.7729 219.283 37.7729H212.975C212.521 37.7729 212.346 37.5509 212.457 37.0977L221.836 1.80781C221.938 1.4563 222.188 1.28979 222.567 1.28979H230.125C230.504 1.28979 230.754 1.46555 230.855 1.80781L240.235 37.0884L240.291 37.3012C240.291 37.6157 240.096 37.7729 239.717 37.7729H233.362C232.983 37.7729 232.733 37.5972 232.631 37.2549ZM222.623 26.1823C222.687 26.2378 222.761 26.2563 222.835 26.2563H229.718C229.782 26.2563 229.856 26.2286 229.93 26.1823C229.995 26.1268 230.014 26.0528 229.986 25.9511L226.388 10.8361C226.351 10.6973 226.304 10.6326 226.23 10.6326C226.156 10.6326 226.11 10.7066 226.073 10.8361L222.586 25.9511C222.549 26.0528 222.567 26.1361 222.641 26.1823H222.623Z" fill="' + 100 secondaryColor + 101 '"/>' + 102 '<path d="M255.508 23.7587V37.0977C255.508 37.2734 255.444 37.4214 255.323 37.5417C255.203 37.6619 255.055 37.7267 254.879 37.7267H248.783C248.608 37.7267 248.46 37.6712 248.339 37.5417C248.219 37.4214 248.154 37.2734 248.154 37.0977V23.7587L248.099 23.4442L239.089 2.02057C239.052 1.94657 239.034 1.84481 239.034 1.70606C239.034 1.42855 239.209 1.28979 239.552 1.28979H246.119C246.499 1.28979 246.748 1.46555 246.85 1.80781" fill="' + 103 secondaryColor + 104 '"/>' + 105 '<path d="M281.151 35.1921C279.014 36.9126 276.257 37.7729 272.89 37.7729H261.216C261.041 37.7729 260.893 37.7082 260.772 37.5879C260.652 37.4677 260.587 37.3197 260.587 37.1439V1.91881C260.587 1.74306 260.643 1.59505 260.772 1.4748C260.893 1.35455 261.041 1.28979 261.216 1.28979H272.113C275.832 1.28979 278.718 2.11307 280.762 3.76887C282.816 5.41542 283.833 7.9315 283.833 11.2986C283.833 14.6657 282.492 17.2188 279.819 18.7543C279.643 18.8561 279.624 18.9671 279.763 19.0688C282.816 20.8079 284.351 23.6755 284.351 27.6716C284.351 30.974 283.288 33.4808 281.151 35.2013V35.1921ZM267.941 7.8575V16.044C267.941 16.2198 268.025 16.303 268.2 16.303H272.16C273.547 16.303 274.648 15.9237 275.443 15.156C276.239 14.3882 276.646 13.3337 276.646 11.9739C276.646 10.6141 276.257 9.50405 275.471 8.74553C274.685 7.987 273.584 7.59849 272.16 7.59849H268.2C268.025 7.59849 267.941 7.68174 267.941 7.8575ZM275.841 30.1877C276.627 29.3737 277.016 28.2174 277.016 26.7188C277.016 25.2203 276.627 24.0547 275.841 23.2037C275.055 22.3527 273.973 21.9272 272.585 21.9272H268.21C268.034 21.9272 267.951 22.0104 267.951 22.1862V31.1497C267.951 31.3255 268.034 31.4087 268.21 31.4087H272.585C273.973 31.4087 275.064 31.0017 275.841 30.1877Z" fill="' + 106 secondaryColor + 107 '"/>' + 108 '<path d="M306.034 37.2549L304.832 32.1488C304.795 32.01 304.712 31.936 304.573 31.936H294.823C294.684 31.936 294.601 32.01 294.564 32.1488L293.361 37.2549C293.26 37.6064 293.028 37.7729 292.686 37.7729H286.377C285.924 37.7729 285.748 37.5509 285.859 37.0977L295.248 1.80781C295.35 1.4563 295.6 1.28979 295.979 1.28979H303.537C303.916 1.28979 304.166 1.46555 304.268 1.80781L313.647 37.0884L313.703 37.3012
108C313.703 37.6157 313.509 37.7729 313.129 37.7729H306.774C306.395 37.7729 306.145 37.5972 306.044 37.2549H306.034ZM296.026 26.1823C296.09 26.2378 296.164 26.2563 296.238 26.2563H303.12C303.185 26.2563 303.259 26.2286 303.333 26.1823C303.398 26.1268 303.416 26.0528 303.389 25.9511L299.79 10.8361C299.753 10.6973 299.707 10.6326 299.633 10.6326C299.559 10.6326 299.513 10.7066 299.476 10.8361L295.989 25.9511C295.952 26.0528 295.97 26.1361 296.044 26.1823H296.026Z" fill="' + 109 secondaryColor + 110 '"/>' + 111 '<path d="M321.572 36.7831C319.768 35.8489 318.362 34.5076 317.372 32.7685C316.382 31.0295 315.883 29.0129 315.883 26.7188V12.2329C315.883 9.97582 316.382 7.98701 317.372 6.26645C318.362 4.5459 319.759 3.21386 321.572 2.27958C323.376 1.3453 325.466 0.873535 327.825 0.873535C330.184 0.873535 332.274 1.33605 334.078 2.25183C335.882 3.17686 337.279 4.46265 338.278 6.13695C339.268 7.802 339.767 9.75381 339.767 11.9739V12.2329C339.767 12.4086 339.702 12.5659 339.582 12.7047C339.462 12.8434 339.314 12.9174 339.138 12.9174L333.042 13.1764C332.626 13.1764 332.413 12.9822 332.413 12.6029V11.9276C332.413 10.5031 331.997 9.35605 331.164 8.48652C330.332 7.61699 329.222 7.18223 327.825 7.18223C326.428 7.18223 325.327 7.61699 324.486 8.48652C323.653 9.35605 323.237 10.5031 323.237 11.9276V27.1906C323.237 28.6151 323.653 29.7529 324.486 30.604C325.318 31.455 326.428 31.8805 327.825 31.8805C329.222 31.8805 330.323 31.455 331.164 30.604C331.997 29.7529 332.413 28.6151 332.413 27.1906V26.5153C332.413 26.1361 332.626 25.9418 333.042 25.9418L339.138 26.2008C339.314 26.2008 339.462 26.2656 339.582 26.3858C339.702 26.5061 339.767 26.6541 339.767 26.8298V26.9871C339.767 29.2072 339.268 31.1775 338.278 32.8795C337.288 34.5816 335.891 35.8951 334.078 36.8109C332.274 37.7359 330.184 38.1892 327.825 38.1892C325.466 38.1892 323.376 37.7174 321.572 36.7831Z" fill="' + 112 secondaryColor + 113 '"/>' + 114 '<path d="M344.636 37.5879C344.515 37.4677 344.451 37.3197 344.451 37.1439V1.91881C344.451 1.74306 344.506 1.59505 344.636 1.4748C344.756 1.35455 344.904 1.28979 345.08 1.28979H351.176C351.351 1.28979 351.499 1.35455 351.62 1.4748C351.74 1.59505 351.805 1.74306 351.805 1.91881V15.785C351.805 15.8867 351.851 15.9607 351.934 15.9978C352.017 16.0348 352.082 15.9978 352.119 15.896L361.443 1.70606C361.619 1.42855 361.86 1.28979 362.174 1.28979H368.899C369.14 1.28979 369.306 1.3638 369.399 1.50255C369.482 1.64131 369.463 1.81706 369.325 2.02057L359.686 16.9783C359.649 17.08 359.649 17.2095 359.686 17.339L369.898 37.0421C369.972 37.1809 370 37.2827 370 37.3567C370 37.6342 369.806 37.7729 369.426 37.7729H362.757C362.442 37.7729 362.202 37.6157 362.026 37.3012L354.626 23.0187C354.589 22.917 354.543 22.8615 354.469 22.8615C354.395 22.8615 354.33 22.917 354.256 23.0187L351.906 26.4043C351.832 26.5431 351.805 26.6448 351.805 26.7188V37.1439C351.805 37.3197 351.74 37.4677 351.62 37.5879C351.499 37.7082 351.351 37.7729 351.176 37.7729H345.08C344.904 37.7729 344.756 37.7082 344.636 37.5879Z" fill="' + 115 secondaryColor + 116 '"/>' + 117 "</svg>"; 118 } 119 120 function changeColor(color) { 121 document 122 .getElementsByClassName("color-button selected")[0] 123 .classList.remove("selected"); 124 document 125 .getElementsByClassName("color-button " + color)[0] 126 .classList.add("selected"); 127 document.getElementById("full-report-card").className = ""; 128 document.getElementById("full-report-card").classList.add(color); 129 document.getElementById("full-report-decor").classList = ""; 130 document.getElementById("full-report-decor").classList.add(color); 131 getLogo(color); 132 } 133 134 var replay = () => { 135 swiper.slideTo(0); 136 }; 137}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.