Jelajahi Sumber

Zufallsavatare erweitert

Alexander Vornam 3 tahun lalu
induk
melakukan
29b6adfb71
31 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      index.js
  2. TEMPAT SAMPAH
      www/img/ava/random/229ab39df96dbd32acbe388a02006086.png
  3. TEMPAT SAMPAH
      www/img/ava/random/2df9a17109d5eb555b2bcf1861e44757.png
  4. TEMPAT SAMPAH
      www/img/ava/random/315def5d41146b5b0a491751a96deab6.png
  5. TEMPAT SAMPAH
      www/img/ava/random/40-407076_-img-kid-goku-clipart.png
  6. TEMPAT SAMPAH
      www/img/ava/random/5A9B3D07-0887-4D9C-9A5A-214D1A569543.png
  7. TEMPAT SAMPAH
      www/img/ava/random/BaseGoten.png
  8. TEMPAT SAMPAH
      www/img/ava/random/Bills.png
  9. TEMPAT SAMPAH
      www/img/ava/random/Broly_by_hirus4drawing-dchqn1e.png
  10. TEMPAT SAMPAH
      www/img/ava/random/C17.png
  11. TEMPAT SAMPAH
      www/img/ava/random/C18.png
  12. TEMPAT SAMPAH
      www/img/ava/random/Chiaotzu_alt_outfit.png
  13. TEMPAT SAMPAH
      www/img/ava/random/Gohan2.png
  14. TEMPAT SAMPAH
      www/img/ava/random/MrPopo-2.png
  15. TEMPAT SAMPAH
      www/img/ava/random/Tien.png
  16. TEMPAT SAMPAH
      www/img/ava/random/Videl.png
  17. TEMPAT SAMPAH
      www/img/ava/random/Whis_Broly.png
  18. TEMPAT SAMPAH
      www/img/ava/random/c041a7ecc4f05901ac0b9c1be2be4ba5.png
  19. TEMPAT SAMPAH
      www/img/ava/random/card_1016510_character.png
  20. TEMPAT SAMPAH
      www/img/ava/random/ccee1253438ec06da532a8a2b0ae7b33.png
  21. TEMPAT SAMPAH
      www/img/ava/random/dbli5i3-2a280762-9e4d-4978-8841-a8f0925d838d.png
  22. TEMPAT SAMPAH
      www/img/ava/random/dcmv06o-7c0557cf-dcd0-44af-aa64-6e02a676dfcd.png
  23. TEMPAT SAMPAH
      www/img/ava/random/ddfo6r9-7b89b38c-65ce-48cb-9e4b-64e4a0ffe7be.png
  24. TEMPAT SAMPAH
      www/img/ava/random/ddh10sf-62af281c-9e88-4fda-b076-caf0123a1f28.png
  25. TEMPAT SAMPAH
      www/img/ava/random/ddomvxj-17fe94c8-42f4-466c-aacc-6e19ddb1697a.png
  26. TEMPAT SAMPAH
      www/img/ava/random/ddvhtty-d5c8ee7d-544e-4f0e-b61a-b608e9865145.png
  27. TEMPAT SAMPAH
      www/img/ava/random/goku__namek_saga__ssj___1_by_ssjrose890_de5wfsk-fullview.png
  28. TEMPAT SAMPAH
      www/img/ava/random/goku__super_saiyan_blue__shintani_palette_by_thetabbyneko_dcrvg6p-fullview.png
  29. TEMPAT SAMPAH
      www/img/ava/random/goku_black_super_saiyan_rose_by_chronofz_dbc5q4k-fullview.png
  30. TEMPAT SAMPAH
      www/img/ava/random/goku_ssj4_by_naironkr_dablmww-fullview.png
  31. TEMPAT SAMPAH
      www/img/ava/random/kid_buu_render__dbz_kakarot__by_maxiuchiha22_ddomwm1-fullview.png

+ 1 - 1
index.js

@@ -51,7 +51,7 @@ app.get('/img/ava/:username', (req, res) => {
     if (fs.existsSync(__dirname + '/www/img/ava/' + req.params.username + '.png')) {
         file = __dirname + '/www/img/ava/' + req.params.username + '.png';
     } else {
-        const files = fs.readdirSync(__dirname + '/www/img/ava/random/');
+        const files = fs.readdirSync(__dirname + '/www/img/ava/random/').filter((f) => f.toLowerCase().endsWith('.png'));
 
         const seededRandom = seedrandom(req.params.username)();
         const randomFile = files[Math.floor(seededRandom * files.length)];

TEMPAT SAMPAH
www/img/ava/random/229ab39df96dbd32acbe388a02006086.png


TEMPAT SAMPAH
www/img/ava/random/2df9a17109d5eb555b2bcf1861e44757.png


TEMPAT SAMPAH
www/img/ava/random/315def5d41146b5b0a491751a96deab6.png


TEMPAT SAMPAH
www/img/ava/random/40-407076_-img-kid-goku-clipart.png


TEMPAT SAMPAH
www/img/ava/random/5A9B3D07-0887-4D9C-9A5A-214D1A569543.png


TEMPAT SAMPAH
www/img/ava/random/BaseGoten.png


TEMPAT SAMPAH
www/img/ava/random/Bills.png


TEMPAT SAMPAH
www/img/ava/random/Broly_by_hirus4drawing-dchqn1e.png


TEMPAT SAMPAH
www/img/ava/random/C17.png


TEMPAT SAMPAH
www/img/ava/random/C18.png


TEMPAT SAMPAH
www/img/ava/random/Chiaotzu_alt_outfit.png


TEMPAT SAMPAH
www/img/ava/random/Gohan2.png


TEMPAT SAMPAH
www/img/ava/random/MrPopo-2.png


TEMPAT SAMPAH
www/img/ava/random/Tien.png


TEMPAT SAMPAH
www/img/ava/random/Videl.png


TEMPAT SAMPAH
www/img/ava/random/Whis_Broly.png


TEMPAT SAMPAH
www/img/ava/random/c041a7ecc4f05901ac0b9c1be2be4ba5.png


TEMPAT SAMPAH
www/img/ava/random/card_1016510_character.png


TEMPAT SAMPAH
www/img/ava/random/ccee1253438ec06da532a8a2b0ae7b33.png


TEMPAT SAMPAH
www/img/ava/random/dbli5i3-2a280762-9e4d-4978-8841-a8f0925d838d.png


TEMPAT SAMPAH
www/img/ava/random/dcmv06o-7c0557cf-dcd0-44af-aa64-6e02a676dfcd.png


TEMPAT SAMPAH
www/img/ava/random/ddfo6r9-7b89b38c-65ce-48cb-9e4b-64e4a0ffe7be.png


TEMPAT SAMPAH
www/img/ava/random/ddh10sf-62af281c-9e88-4fda-b076-caf0123a1f28.png


TEMPAT SAMPAH
www/img/ava/random/ddomvxj-17fe94c8-42f4-466c-aacc-6e19ddb1697a.png


TEMPAT SAMPAH
www/img/ava/random/ddvhtty-d5c8ee7d-544e-4f0e-b61a-b608e9865145.png


TEMPAT SAMPAH
www/img/ava/random/goku__namek_saga__ssj___1_by_ssjrose890_de5wfsk-fullview.png


TEMPAT SAMPAH
www/img/ava/random/goku__super_saiyan_blue__shintani_palette_by_thetabbyneko_dcrvg6p-fullview.png


TEMPAT SAMPAH
www/img/ava/random/goku_black_super_saiyan_rose_by_chronofz_dbc5q4k-fullview.png


TEMPAT SAMPAH
www/img/ava/random/goku_ssj4_by_naironkr_dablmww-fullview.png


TEMPAT SAMPAH
www/img/ava/random/kid_buu_render__dbz_kakarot__by_maxiuchiha22_ddomwm1-fullview.png