Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,19 @@ function getTraits(genes) {
let pattern = getPatternsFromGroup(groups[1]);
let color = getColorsFromGroup(groups[1], groups[0].slice(0, 4));
let eyes = getPartsFromGroup("eyes", groups[2], region);
if (jpParts.find(p=>p==eyes.d.name)) jpcount++;
let mouth = getPartsFromGroup("mouth", groups[3], region);
if (jpParts.find(p=>p==mouth.d.name)) jpcount++;
let ears = getPartsFromGroup("ears", groups[4], region);
if (jpParts.find(p=>p==ears.d.name)) jpcount++;
let horn = getPartsFromGroup("horn", groups[5], region);
if (jpParts.find(p=>p==horn.d.name)) jpcount++;
let back = getPartsFromGroup("back", groups[6], region);
if (jpParts.find(p=>p==back.d.name)) jpcount++;
let tail = getPartsFromGroup("tail", groups[7], region);
if (jpParts.find(p=>p==tail.d.name)) jpcount++;
if (options.axieEx_japanCount > 0) {
if (jpParts.find(p=>p==eyes.d.name)) jpcount++;
if (jpParts.find(p=>p==mouth.d.name)) jpcount++;
if (jpParts.find(p=>p==ears.d.name)) jpcount++;
if (jpParts.find(p=>p==horn.d.name)) jpcount++;
if (jpParts.find(p=>p==back.d.name)) jpcount++;
if (jpParts.find(p=>p==tail.d.name)) jpcount++;
}
return {
cls: cls,
region: region,
Expand Down Expand Up @@ -1308,7 +1310,7 @@ function renderCard(anc, axie) {
content.className = content.className.replace("invisible", "visible");
}

if (axie.traits.jpcount >= options.axieEx_japanCount) {
if (options.axieEx_japanCount > 0 && axie.traits.jpcount >= options.axieEx_japanCount) {
let imgHolders = anc.querySelectorAll("img");
let imgHolder = null;
for (let i = 0; i < imgHolders.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
<div >
<input type="number" id="japanCount" class="mr-1">
<label for="japanCount" title="Alert on this JP part count.">Japan part alert threshold.</label>
<label for="japanCount" title="Use 0 to disable!">Japan part alert threshold.</label>
</div>
<div >
<input type="checkbox" id="eggParentOption" class="mr-1">
Expand Down