Skip to content

Commit

Permalink
Merge pull request #29 from Gwenillia/staging
Browse files Browse the repository at this point in the history
v1.3.0-beta.3
  • Loading branch information
Gwenillia authored May 16, 2022
2 parents abfb562 + 122acb8 commit 29eb166
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
10 changes: 8 additions & 2 deletions competitionsDiffDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ function competitionsDiffDisplay() {
const characteristics = document.getElementById('characteristics-body-content');
const ageStr = characteristics.getElementsByClassName('align-right')[0].textContent;
const ageStrArr = ageStr.match(/[1-9]\d*/g);
const ageIntArr = ageStrArr.map((i) => Number(i));
let ageIntArr;

if (ageStrArr) {
ageIntArr = ageStrArr.map((i) => Number(i));
} else return;

if (ageIntArr.length > 1) {
age = ageIntArr[0] * 12 + ageIntArr[1];
} else {
} else if (ageIntArr.length === 1) {
age = ageIntArr[0] * 12;
} else {
return;
}

const stamina = parseFloat(document.getElementById('enduranceValeur').innerText);
Expand Down
4 changes: 2 additions & 2 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<html lang='en'>
<head>
<link rel='stylesheet' type='text/css' href='popup.css'>
<script defer type='text/javascript' src='popupSelling.js'></script>
<script defer type='text/javascript' src='popup.js'></script>
</head>

<body id='frame'>
<body id='frame' style='background: #FDFCC6'>
<a target='_blank' ref='noopener noreferrer'
href='https://www.ouranos.equideow.com/'><img
src='https://www.equideow.com/media/equideo/image/interface/icon/ouranos-register.png?25196949' /></a>
Expand Down
15 changes: 15 additions & 0 deletions popup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2022. Gwen Tripet-Costet
* This file is part of Better Equideow (Better Howrse).
* Better Equideow (Better Howrse) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* Better Equideow (Better Howrse) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const links = document.getElementsByTagName('a');

Array.from(links).forEach((a) => {
a.addEventListener('click', () => {
window.close();
});
});

0 comments on commit 29eb166

Please sign in to comment.