Skip to content

Commit ace9580

Browse files
committed
Fixed .js error that made AoE4_Overlay.js not load in Brave
1 parent 68eb108 commit ace9580

File tree

6 files changed

+41
-46
lines changed

6 files changed

+41
-46
lines changed

public/build.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@
4242
style="font-size: 4.8rem; margin-top: -0.8rem;">👁</span><span>Browse All Builds</span></a>
4343
<a class="desktop-only" href="https://github.com/LENpolygon/Build-Order-Tool-AoE4-"
4444
title="This website is on Github, check out the code here!"><img
45-
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon"
45+
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon salamander_icon"
4646
alt="This website is on Github, check out the code here!"><span>Donate Code</span></a>
4747
<a class="desktop-only gold" href="https://ko-fi.com/lenpolygon"
4848
title="This website is Ad-Free, consider donating to maintain it!"><img src="img/dropofftax.png"
49-
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon"
49+
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon salamander_icon"
5050
alt="This website is Ad-Free, consider donating to maintain it!"><span>Donate Coin</span></a>
5151
<a id="copyForOverlayBtn" class="desktop-only" style="color:aqua;"
5252
title="Copy Simple TXT Build to Clipboard for AoE4_Overlay!">
5353
<span style="font-size: 4.8rem; margin-top: -0.8rem;">M</span>
5454
<span onclick="window.open('https://github.com/FluffyMaguro/AoE4_Overlay')" onmouseenter="simpleTxtOverlayEnterHelp()"
5555
onmouseleave="simpleTxtOverlayLeaveHelp() " title="Click to learn more about AoE4_Overlay!" id="AoE4_Overlay">?</span>
5656
<span id="hybridSimpleTxtOverlayText" style="text-align: center;">Simple TXT Build to Clipboard</span></a>
57-
<a id="copyForIllustratedOverlayBtn" class="desktop-only" style="color:aqua;" title="Copy Illustrated Build to Clipboard for AoE4_Overlay!">
58-
<img src="assets/salamander.png" class="salamander_icon">
59-
<span onclick="window.open('https://github.com/FluffyMaguro/AoE4_Overlay')" onmouseenter="illustratedOverlayEnterHelp()" onmouseleave="illustratedOverlayLeaveHelp() " title="Click to learn more about AoE4_Overlay!" id="AoE4_Overlay">?</span>
60-
<span id="hybridIllustratedOverlayText" style="text-align: center;">Illustrated Build to Clipboard</span></a>
57+
<a id="copyForIllustratedOverlayBtn" class="desktop-only" style="color:aqua;" title="Copy Illustrated Build to Clipboard for AoE4_Overlay!">
58+
<img src="assets/salamander.png" onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon salamander_icon" alt="CraftySalamander">
59+
<span onclick="window.open('https://github.com/FluffyMaguro/AoE4_Overlay')" onmouseenter="illustratedOverlayEnterHelp()" onmouseleave="illustratedOverlayLeaveHelp() " title="Click to learn more about AoE4_Overlay!" id="AoE4_Overlay">?</span>
60+
<span id="hybridIllustratedOverlayText" style="text-align: center;">Illustrated Build to Clipboard</span></a>
6161
<a class="dropdown">
6262
<nav class="dropbtn">
6363
<div></div>
@@ -204,8 +204,8 @@ <h4 class="desktop-only" style="text-align: right; margin-right: 1rem;">Unique<b
204204
</div>
205205
<script language="javascript" src="js/lz-string.min.js"></script>
206206
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
207-
<script type="module" src="js/build.js"></script>
208-
<script language="javascript" src="js/AoE4_Overlay.js"></script>
207+
<script type="module" src="js/build.js" src="module.js"></script>
208+
<script language="javascript" src="js/AoE4_Button.js"></script>
209209
<script src="js/eu_cookie_banner.js"></script>
210210
<script>
211211
new CookiesEuBanner(function () {

public/css/global.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,6 @@ section {
199199

200200
.salamander_icon {
201201
cursor: pointer;
202-
width: 4.8rem;
203-
margin: 0.2rem;
204-
max-height: 4.8rem;
205-
max-width: 4.8rem;
206202
}
207203

208204
table {

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
style="font-size: 4.5rem; margin-top: -0.8rem;"></span><span>Create New Build</span></a>
4343
<a class="desktop-only" href="https://github.com/LENpolygon/Build-Order-Tool-AoE4-"
4444
title="This website is on Github, check out the code here!"><img
45-
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon"
45+
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon salamander_icon"
4646
alt="This website is on Github, check out the code here!"><span>Donate Code</span></a>
4747
<a class="desktop-only gold" href="https://ko-fi.com/lenpolygon"
4848
title="This website is Ad-Free, consider donating to maintain it!"><img src="img/dropofftax.png"
49-
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon"
49+
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon salamander_icon"
5050
alt="This website is Ad-Free, consider donating to maintain it!"><span>Donate Coin</span></a>
5151
<a class="desktop-only" target="_blank" rel="noopener" href="https://aoe4world.com/"
5252
title="Check out another great AoE 4 Tool!"><span

public/js/AoE4_Button.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Help when hovering the simple TXT build (entering)
2+
function simpleTxtOverlayEnterHelp() {
3+
document.getElementById('hybridSimpleTxtOverlayText').innerHTML = 'What is the simple TXT format for AoE4_Overlay?';
4+
document.getElementById('hybridSimpleTxtOverlayText').style.color = '#fff';
5+
}
6+
7+
// Help when hovering the simple TXT build (leaving)
8+
function simpleTxtOverlayLeaveHelp() {
9+
document.getElementById('hybridSimpleTxtOverlayText').innerHTML = 'Simple TXT Build Order to Clipboard';
10+
document.getElementById('hybridSimpleTxtOverlayText').style.color = 'aqua';
11+
}
12+
13+
// Help when hovering the Illustrated Build Order (entering)
14+
function illustratedOverlayEnterHelp() {
15+
document.getElementById('hybridIllustratedOverlayText').innerHTML = 'What is the Illustrated format for AoE4_Overlay?';
16+
document.getElementById('hybridIllustratedOverlayText').style.color = '#fff';
17+
}
18+
19+
// Help when hovering the Illustrated Build Order (leaving)
20+
function illustratedOverlayLeaveHelp() {
21+
document.getElementById('hybridIllustratedOverlayText').innerHTML = 'Illustrated Build Order to Clipboard';
22+
document.getElementById('hybridIllustratedOverlayText').style.color = 'aqua';
23+
}

public/js/AoE4_Overlay.js

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,9 @@
1-
// Help when hovering the simple TXT build (entering)
2-
function simpleTxtOverlayEnterHelp() {
3-
document.getElementById('hybridSimpleTxtOverlayText').innerHTML = 'What is the simple TXT format for AoE4_Overlay?';
4-
document.getElementById('hybridSimpleTxtOverlayText').style.color = '#fff';
5-
}
6-
7-
// Help when hovering the simple TXT build (leaving)
8-
function simpleTxtOverlayLeaveHelp() {
9-
document.getElementById('hybridSimpleTxtOverlayText').innerHTML = 'Simple TXT Build Order to Clipboard';
10-
document.getElementById('hybridSimpleTxtOverlayText').style.color = 'aqua';
11-
}
12-
13-
// Help when hovering the Illustrated Build Order (entering)
14-
function illustratedOverlayEnterHelp() {
15-
document.getElementById('hybridIllustratedOverlayText').innerHTML = 'What is the Illustrated format for AoE4_Overlay?';
16-
document.getElementById('hybridIllustratedOverlayText').style.color = '#fff';
17-
}
18-
19-
// Help when hovering the Illustrated Build Order (leaving)
20-
function illustratedOverlayLeaveHelp() {
21-
document.getElementById('hybridIllustratedOverlayText').innerHTML = 'Illustrated Build Order to Clipboard';
22-
document.getElementById('hybridIllustratedOverlayText').style.color = 'aqua';
23-
}
24-
251
/** Copy for AoE4_Overlay event
262
* https://github.com/FluffyMaguro/AoE4_Overlay
273
*
284
* @param input - input to convert
295
*/
30-
function htmlDecode(input) {
6+
export const htmlDecode = (input) => {
317
var doc = new DOMParser().parseFromString(input, "text/html");
328
return doc.documentElement.textContent;
339
}
@@ -614,10 +590,10 @@ function focusToAuthorName(input) {
614590
} else {
615591
return 'unknown';
616592
}
617-
}
593+
};
618594

619595
// Copy to clipboard for Illustrated Build Order format
620-
function copyForIllustratedOverlay() {
596+
export const copyForIllustratedOverlay = () => {
621597

622598
// selected civilization
623599
var civName = civToOverlayName(document.getElementById("civilizationName").innerHTML);

public/view.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
style="font-size: 4.8rem; margin-top: -0.8rem;"></span><span>Edit this Build</span></a>
4343
<a class="desktop-only" href="https://github.com/LENpolygon/Build-Order-Tool-AoE4-"
4444
title="This website is on Github, check out the code here!"><img
45-
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon"
45+
src="assets/GitHub-Mark/PNG/GitHub-Mark-Light-64px.png" class="desktop-only icon salamander_icon"
4646
alt="This website is on Github, check out the code here!"><span>Donate Code</span></a>
4747
<a class="desktop-only gold" href="https://ko-fi.com/lenpolygon"
4848
title="This website is Ad-Free, consider donating to maintain it!"><img src="img/dropofftax.png"
49-
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon"
49+
onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon salamander_icon"
5050
alt="This website is Ad-Free, consider donating to maintain it!"><span>Donate Coin</span></a>
5151
<a id="copyForOverlayBtn" class="desktop-only" style="color:aqua;"
5252
title="Copy Simple TXT Build to Clipboard for AoE4_Overlay!">
@@ -55,7 +55,7 @@
5555
onmouseleave="simpleTxtOverlayLeaveHelp() " title="Click to learn more about AoE4_Overlay!" id="AoE4_Overlay">?</span>
5656
<span id="hybridSimpleTxtOverlayText" style="text-align: center;">Simple TXT Build to Clipboard</span></a>
5757
<a id="copyForIllustratedOverlayBtn" class="desktop-only" style="color:aqua;" title="Copy Illustrated Build to Clipboard for AoE4_Overlay!">
58-
<img src="assets/salamander.png" class="salamander_icon">
58+
<img src="assets/salamander.png" onerror="this.src = 'assets/placeholder.png';" class="desktop-only icon salamander_icon" alt="CraftySalamander">
5959
<span onclick="window.open('https://github.com/FluffyMaguro/AoE4_Overlay')" onmouseenter="illustratedOverlayEnterHelp()" onmouseleave="illustratedOverlayLeaveHelp() " title="Click to learn more about AoE4_Overlay!" id="AoE4_Overlay">?</span>
6060
<span id="hybridIllustratedOverlayText" style="text-align: center;">Illustrated Build to Clipboard</span></a>
6161
<a class="dropdown">
@@ -186,8 +186,8 @@ <h3 class="logged-in" style="text-align: right; margin-right: 1rem;"><a href="#"
186186
</div>
187187
<script language="javascript" src="js/lz-string.min.js"></script>
188188
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
189-
<script type="module" src="js/view.js"></script>
190-
<script language="javascript" src="js/AoE4_Overlay.js"></script>
189+
<script type="module" src="js/view.js" src="module.js"></script>
190+
<script language="javascript" src="js/AoE4_Button.js"></script>
191191
<script src="js/eu_cookie_banner.js"></script>
192192
<script>
193193
new CookiesEuBanner(function () {

0 commit comments

Comments
 (0)