Bladeren bron

Use MCHeads instead of Crafatar (#181)

* Update landing.js

This changes the Skin/Avatar server displayed on the landing page to one that displays the hat layer which then features the skin correctly.

* Create landing.js

This changes the Skin/Avatar server displayed on the landing page to one that displays the hat layer which then features the skin correctly.

* Updated remaining Crafatar URLS

Changed Crafatar URLS to matching mc-heads url.
Peter 4 jaren geleden
bovenliggende
commit
54e6572754
3 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 2 2
      app/assets/js/scripts/landing.js
  2. 1 1
      app/assets/js/scripts/overlay.js
  3. 1 1
      app/assets/js/scripts/settings.js

+ 2 - 2
app/assets/js/scripts/landing.js

@@ -130,7 +130,7 @@ function updateSelectedAccount(authUser){
             username = authUser.displayName
         }
         if(authUser.uuid != null){
-            document.getElementById('avatarContainer').style.backgroundImage = `url('https://crafatar.com/renders/body/${authUser.uuid}')`
+            document.getElementById('avatarContainer').style.backgroundImage = `url('https://mc-heads.net/body/${authUser.uuid}/right')`
         }
     }
     user_text.innerHTML = username
@@ -1143,4 +1143,4 @@ function loadNews(){
             })
         })
     })
-}
+}

+ 1 - 1
app/assets/js/scripts/overlay.js

@@ -299,7 +299,7 @@ function populateAccountListings(){
     let htmlString = ''
     for(let i=0; i<accounts.length; i++){
         htmlString += `<button class="accountListing" uuid="${accounts[i].uuid}" ${i===0 ? 'selected' : ''}>
-            <img src="https://crafatar.com/renders/head/${accounts[i].uuid}?scale=2&default=MHF_Steve&overlay">
+            <img src="https://mc-heads.net/head/${accounts[i].uuid}/40">
             <div class="accountListingName">${accounts[i].displayName}</div>
         </button>`
     }

+ 1 - 1
app/assets/js/scripts/settings.js

@@ -444,7 +444,7 @@ function populateAuthAccounts(){
         const acc = authAccounts[val]
         authAccountStr += `<div class="settingsAuthAccount" uuid="${acc.uuid}">
             <div class="settingsAuthAccountLeft">
-                <img class="settingsAuthAccountImage" alt="${acc.displayName}" src="https://crafatar.com/renders/body/${acc.uuid}?scale=3&default=MHF_Steve&overlay">
+                <img class="settingsAuthAccountImage" alt="${acc.displayName}" src="https://mc-heads.net/body/${acc.uuid}/60">
             </div>
             <div class="settingsAuthAccountRight">
                 <div class="settingsAuthAccountDetails">