I'm wasting time here. / Should probably get a job. / Oh well, I'm not old.
4
   
Award
Favorite
Favorited
Unfavorite
Download
" alter_showcase2 = (_showcase, callback = '') => {
if (!profile.hasOwnProperty(_showcase)) {
return;
}
var showcase = profile[_showcase];
showcase.selection = [];
if (showcase.shuffle_slots.length) {
var to_shuffle = [];
showcase.shuffle_slots.forEach((slot) =>
to_shuffle.push([showcase.slots[slot], showcase.shuffle_types[slot]]));
shuffle_array(to_shuffle);
showcase.shuffle_slots.forEach((slot, i) => (
showcase.slots[slot] = to_shuffle[0],
showcase.shuffle_types[slot] = to_shuffle[1]));
}
showcase.slots.forEach((slot, i) => {
if (slot.length && typeof showcase.shuffle_types !== 'undefined') {
var element;
if (showcase.shuffle_types === 0) {
element = slot[Math.floor(Math.random()*slot.length)];
} else if (showcase.shuffle_types < 0) {
if (showcase.shuffle_types == -1) {
shuffle_array(slot);
}
element = slot[Math.abs(showcase.shuffle_types[i])-1];
showcase.shuffle_types--;
if (Math.abs(showcase.shuffle_types)-1 == slot.length) {
showcase.shuffle_types = -1;
}
} else if (showcase.shuffle_types > 0) {
element = slot[showcase.shuffle_types[i]-1];
showcase.shuffle_types++;
if (showcase.shuffle_types-1 == slot.length) {
showcase.shuffle_types = 1;
}
}
if ({}.toString.call(element) === '[object Function]') {
element = element(account, profile.lite);
}
showcase.selection = element;
if (typeof element === 'string') {
if (profile.lite) {
element = emoticon_convert(element);
}
element = encodeURIComponent(element);
}
callback(i, element);
}
})
},
"
1 Comments
Himiko Toga ・∀・ 26 Jan, 2021 @ 8:06am 
We have a job to do
Adler