Untitled Diff

Created Diff never expires
6 removals
54 lines
6 additions
54 lines
function displayTrollGirlsShards() {
function displayTrollGirlsShards() {
if(($('.girls_reward').attr('data-rewards') != undefined) && (CurrentPage.indexOf('battle') != -1)) {
if(($('.girls_reward').attr('data-rewards') != undefined) && (CurrentPage.indexOf('battle') != -1)) {
let girlsData = JSON.parse($('.girls_reward').attr('data-rewards'));
let girlsData = JSON.parse($('.girls_reward').attr('data-rewards'));
for (let j=0; j < girlsData.length; j++) {
for (let j=0; j < girlsData.length; j++) {
let girlId = girlsData[j].id_girl;
let girlId = girlsData[j].id_girl;
let shards = (girlDictionary.get(girlId.toString()) != undefined) ? girlDictionary.get(girlId.toString()).shards : 0;
let shards = (girlDictionary.get(girlId.toString()) != undefined) ? girlDictionary.get(girlId.toString()).shards : 0;
let name = (girlDictionary.get(girlId.toString()) != undefined) ? girlDictionary.get(girlId.toString()).name : '';
let name = (girlDictionary.get(girlId.toString()) != undefined) ? girlDictionary.get(girlId.toString()).name : '';
$('.slot_girl_shards:nth-child(' + (j+1) + ') .girl_ico').append('<div class="shards" shards="' + shards + '" name="' + name + '">'
$('.slot_girl_shards:nth-child(' + (j+1) + ') .girl_ico').append('<div class="shards" shards="' + shards + '" name="' + name + '">'
+ '<span class="shard"></span>'
+ '<span class="shard"></span>'
+ '<p id="shard_number">'
+ '<p id="shard_number">'
+ '<span>' + shards + '</span>'
+ '<span>' + shards + '</span>'
+ '</p></div>');
+ '</p></div>');


sheet.insertRule('.page-battle #shard_number {'
sheet.insertRule('.page-battle #shard_number {'
+ 'position: absolute;'
+ 'position: absolute;'
+ 'padding-left: 10px;'
+ 'padding-left: 10px;'
+ 'color: #80058b;'
+ 'color: #80058b;'
+ 'text-shadow: 1px 1px 0 #fff,-1px 1px 0 #fff,-1px -1px 0 #fff,1px -1px 0 #fff;'
+ 'text-shadow: 1px 1px 0 #fff,-1px 1px 0 #fff,-1px -1px 0 #fff,1px -1px 0 #fff;'
+ 'width: 28px;'
+ 'width: 28px;'
+ 'text-align: right;'
+ 'text-align: right;'
+ 'font-size: 12px;}'
+ 'font-size: 12px;}'
);
);


sheet.insertRule('.page-battle .shards .shard {'
sheet.insertRule('.page-battle .shards .shard {'
+ 'background-image: url(https://hh2.hh-content.com/shards.png);'
+ 'background-image: url(https://hh2.hh-content.com/shards.png);'
+ 'background-repeat: no-repeat;'
+ 'background-repeat: no-repeat;'
+ 'background-size: contain;'
+ 'background-size: contain;'
+ 'position: absolute;'
+ 'position: absolute;'
+ 'width: 20px;'
+ 'width: 55px;'
+ 'height: 20px;}'
+ 'height: 55px;}'
);
);


if (girlsData.length > 1) {
if (girlsData.length > 1) {
sheet.insertRule('.page-battle #shard_number {'
sheet.insertRule('.page-battle #shard_number {'
+ 'margin-top: -10px;}'
+ 'margin-top: -10px;}'
);
);


sheet.insertRule('.page-battle .shards .shard {'
sheet.insertRule('.page-battle .shards .shard {'
+ 'margin-left: 7px;'
+ 'margin-left: -8px;'
+ 'margin-top: -11px;}'
+ 'margin-top: 10px;}'
);
);
}
}
else {
else {
sheet.insertRule('.page-battle #shard_number {'
sheet.insertRule('.page-battle #shard_number {'
+ 'margin-top: -14px;}'
+ 'margin-top: -14px;}'
);
);


sheet.insertRule('.page-battle .shards .shard {'
sheet.insertRule('.page-battle .shards .shard {'
+ 'margin-left: 3px;'
+ 'margin-left: 3px;'
+ 'margin-top: -15px;}'
+ 'margin-top: -15px;}'
);
);
}
}
}
}
}
}