remove api, images are now local
@@ -40,35 +40,25 @@ jQuery(function($) {
|
|||||||
console.log("testing function")
|
console.log("testing function")
|
||||||
console.log(chckGender());
|
console.log(chckGender());
|
||||||
|
|
||||||
|
|
||||||
loadapi();
|
loadapi();
|
||||||
function getData(gender) {
|
function getData(gender) {
|
||||||
let malecnt = chckGender()[0];
|
let malecnt = chckGender()[0];
|
||||||
let femalecnt = chckGender()[1];
|
let femalecnt = chckGender()[1];
|
||||||
|
let x = (Math.random() * 99).toFixed(0);
|
||||||
if (gender == "male")
|
if (gender == "male")
|
||||||
{
|
{
|
||||||
return $.ajax({
|
return "assets/img/pfp/m/" + x + ".jpg"
|
||||||
url: 'https://randomuser.me/api/?inc=picture&results=' + malecnt + '&gender=male',
|
|
||||||
dataType: 'json',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else if (gender == "female")
|
else if (gender == "female")
|
||||||
{
|
{
|
||||||
return $.ajax({
|
return "assets/img/pfp/f/" + x + ".jpg"
|
||||||
url: 'https://randomuser.me/api/?inc=picture&results=' + femalecnt + '&gender=female',
|
|
||||||
dataType: 'json',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
async function loadapi() {
|
async function loadapi() {
|
||||||
if (equLoaded == 0){
|
if (equLoaded == 0){
|
||||||
try {
|
try {
|
||||||
const resMen = await getData('male');
|
|
||||||
const resWoman = await getData('female');
|
|
||||||
console.log(resMen);
|
|
||||||
console.log(resWoman);
|
|
||||||
picurlWom = resWoman;
|
|
||||||
picurlMen = resMen;
|
|
||||||
equipeMain();
|
equipeMain();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -159,12 +149,11 @@ jQuery(function($) {
|
|||||||
nomdesc = equipeText(item);
|
nomdesc = equipeText(item);
|
||||||
console.log(nomdesc[0]);
|
console.log(nomdesc[0]);
|
||||||
console.log(nomdesc[1]);
|
console.log(nomdesc[1]);
|
||||||
if (nomdesc[1]){picurl = picurlWom;countFemale++;count = countFemale;console.log(countFemale);}
|
if (nomdesc[1]){picurl = getData('female');countFemale++;count = countFemale;console.log(countFemale);}
|
||||||
else{picurl = picurlMen;countMale++;count = countMale;console.log(countMale);};
|
else{picurl = getData('male');countMale++;count = countMale;console.log(countMale);};
|
||||||
try {
|
try {
|
||||||
console.log(picurl);
|
console.log(picurl);
|
||||||
console.log(picurl.results[count].picture.large);
|
body += "<tr><td><div id='playerwindow' class='window' style='margin: auto;'><div class='title-bar' style='padding-top: 15px; padding-bottom: 15px;'><div id='title-bar-xp'class='title-bar-text'> " + nomdesc[0] + "</div></div><div class='window-body'><img src='" + picurl.toString() + "'></div></div></td><td style='padding-top: 3%;'><div id='playerwindow' class='window'><div class='title-bar'style='padding-top: 15px; padding-bottom: 15px;'><div id='title-bar-xp'class='title-bar-text'>Meaculpa.mpeg</div><div class='title-bar-controls'><button aria-label='Close'></button></div></div><div class='window-body'>" + nomdesc[2] + "</td></div></div></tr>";
|
||||||
body += "<tr><td><div id='playerwindow' class='window' style='margin: auto;'><div class='title-bar' style='padding-top: 15px; padding-bottom: 15px;'><div id='title-bar-xp'class='title-bar-text'> " + nomdesc[0] + "</div></div><div class='window-body'><img src='" + picurl.results[count].picture.large.toString() + "'></div></div></td><td style='padding-top: 3%;'><div id='playerwindow' class='window'><div class='title-bar'style='padding-top: 15px; padding-bottom: 15px;'><div id='title-bar-xp'class='title-bar-text'>Meaculpa.mpeg</div><div class='title-bar-controls'><button aria-label='Close'></button></div></div><div class='window-body'>" + nomdesc[2] + "</td></div></div></tr>";
|
|
||||||
apiLoaded = 1;
|
apiLoaded = 1;
|
||||||
equLoaded = 1;
|
equLoaded = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |