Skip to content

Commit 7e9c340

Browse files
author
prima
committed
feat: Added quicker download buttons
1 parent 71ca36b commit 7e9c340

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

embd_res/css/esoStyling.css

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

embd_res/js/characterManager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,10 @@ let showCharacterList = async () => {
11261126
}
11271127
}, false);
11281128
})
1129+
.button("Download", () => {
1130+
popupUtils.reset()
1131+
save_file_button()
1132+
})
11291133
.button("Share", () => {
11301134
popupUtils.reset()
11311135
share_story_button()

embd_res/js/newTopMenuButtons.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ window.addEventListener('load', () => {
77
</li>`
88
topButton += `<li class="nav-item" id="topbtn_data_manager">
99
<a class="nav-link mainnav" href="#" onclick="closeTopNav(); showCharacterList();" tabindex="0">Data</a>
10-
<a id="topbtn_save_current" class="nav-link mainnav hidden" href="#" tabindex="0" style="position: absolute;">Save</a>
10+
<span id="additionalSameOptions" class="hidden" style="position: absolute;">
11+
<a id="topbtn_save_current" class="nav-link mainnav" href="#" tabindex="0">Q.Save</a>
12+
<a id="topbtn_download_current" class="nav-link mainnav" href="#" tabindex="0">Download</a>
13+
</span>
1114
</li>`
1215

1316
document.querySelector("#navbarNavDropdown > ul").innerHTML += topButton;
@@ -16,10 +19,10 @@ window.addEventListener('load', () => {
1619

1720
let dataElem = document.querySelector("#topbtn_data_manager")
1821
dataElem.addEventListener("mouseenter", () => {
19-
document.querySelector("#topbtn_save_current").classList.remove("hidden")
22+
document.querySelector("#additionalSameOptions").classList.remove("hidden")
2023
})
2124
dataElem.addEventListener("mouseleave", () => {
22-
document.querySelector("#topbtn_save_current").classList.add("hidden")
25+
document.querySelector("#additionalSameOptions").classList.add("hidden")
2326
})
2427

2528
document.querySelector("#topbtn_save_current").addEventListener("click", () => {
@@ -33,4 +36,8 @@ window.addEventListener('load', () => {
3336
}
3437
}, false);
3538
})
39+
40+
document.querySelector("#topbtn_save_current").addEventListener("click", () => {
41+
save_file_button()
42+
})
3643
})

0 commit comments

Comments
 (0)