This commit is contained in:
reschan 2021-10-18 08:42:18 +07:00
commit 563e535859
60 changed files with 987 additions and 734 deletions

View file

@ -6,7 +6,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="/css/styles.css">
<link rel="icon" href="favicon.png">
<link rel="manifest" href="manifest.json">
<title>ATLAS???</title>
@ -37,8 +37,8 @@
</div>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="atlas.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/atlas.js"></script>
</body>
</html>

View file

@ -9,9 +9,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="index-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="index-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="/css/index-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="/css/index-narrow.css"/>
<link rel="icon" href="./media/icons/new/builder.png">
<link rel="manifest" href="manifest.json">
<title>WynnBuilder</title>
@ -982,20 +982,20 @@
</div>
</footer>
</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="powders.js"></script>
<script type="text/javascript" src="skillpoints.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="load.js"></script>
<script type="text/javascript" src="load_ing.js"></script>
<script type="text/javascript" src="custom.js"></script>
<script type="text/javascript" src="craft.js"></script>
<script type="text/javascript" src="build2.js"></script>
<script type="text/javascript" src="builder.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/powders.js"></script>
<script type="text/javascript" src="/js/skillpoints.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/load_ing.js"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<script type="text/javascript" src="/js/craft.js"></script>
<script type="text/javascript" src="/js/build2.js"></script>
<script type="text/javascript" src="/js/builder.js"></script>
</body>
</html>

1303
clean.json

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -6,9 +6,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="crafter-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="crafter-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="/css/crafter-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="/css/crafter-narrow.css"/>
<link rel="icon" href="./media/icons/new/crafter.png">
<link rel="manifest" href="manifest.json">
<title>WynnCrafter</title>
@ -213,17 +213,17 @@
</div>
</footer>
</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="powders.js"></script>
<script type="text/javascript" src="skillpoints.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="load_ing.js"></script>
<script type="text/javascript" src="craft.js"></script>
<script type="text/javascript" src="crafter.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/powders.js"></script>
<script type="text/javascript" src="/js/skillpoints.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/load_ing.js"></script>
<script type="text/javascript" src="/js/craft.js"></script>
<script type="text/javascript" src="/js/crafter.js"></script>
</body>
</html>

View file

@ -6,9 +6,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" media="screen and (min-width: 800px)" href="customwide.css"/>
<link rel="stylesheet" media="screen and (max-width: 799px)" href="customnarrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" media="screen and (min-width: 800px)" href="/css/customwide.css"/>
<link rel="stylesheet" media="screen and (max-width: 799px)" href="/css/customnarrow.css"/>
<link rel="icon" href="./media/icons/old/custom.png">
<link rel="manifest" href="manifest.json">
<title>WynnCustom</title>
@ -1874,20 +1874,20 @@
</div>
</footer>
</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="powders.js"></script>
<script type="text/javascript" src="skillpoints.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="load.js"></script>
<script type="text/javascript" src="load_ing.js"></script>
<script type="text/javascript" src="crafter.js"></script>
<script type="text/javascript" src="craft.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="custom.js"></script>
<script type="text/javascript" src="customizer.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/powders.js"></script>
<script type="text/javascript" src="/js/skillpoints.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/load_ing.js"></script>
<script type="text/javascript" src="/js/crafter.js"></script>
<script type="text/javascript" src="/js/craft.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<script type="text/javascript" src="/js/customizer.js"></script>
</body>
</html>

View file

@ -5,8 +5,8 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="article.css">
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/css/article.css">
<link rel="icon" href="./media/memes/agony.png">
<link rel="manifest" href="manifest.json">
<title>Base DPS Visualizer</title>
@ -64,9 +64,9 @@
</p>
<script src="https://d3js.org/d3.v7.js"></script>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="dps_vis.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/dps_vis.js"></script>
</body>
</html>

View file

@ -10,9 +10,9 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="index-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="index-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="/css/index-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="/css/index-narrow.css"/>
<link rel="icon" href="./media/icons/new/builder.png">
<link rel="manifest" href="manifest.json">
<title>WynnBuilder</title>
@ -157,7 +157,9 @@
<tr>
<td class="left">
<label for="build-name">Build Name:</label><br>
<input id="build-name" name="build-name"/>
<input id="build-name" name="build-name" list="build-choice" />
<datalist id="build-choice">
</datalist>
<!-- Dummy <p> tag for horizontal alignment -->
<p style="top: 30px; font-size: 10px; padding: 0; margin: 0; height: 5px; font-family: 'Nunito', sans-serif; white-space: nowrap; word-break:break-word;"></p>
@ -1010,20 +1012,20 @@
</div>
</footer>
</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="powders.js"></script>
<script type="text/javascript" src="skillpoints.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="load.js"></script>
<script type="text/javascript" src="load_ing.js"></script>
<script type="text/javascript" src="custom.js"></script>
<script type="text/javascript" src="craft.js"></script>
<script type="text/javascript" src="build.js"></script>
<script type="text/javascript" src="builder.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/powders.js"></script>
<script type="text/javascript" src="/js/skillpoints.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/load_ing.js"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<script type="text/javascript" src="/js/craft.js"></script>
<script type="text/javascript" src="/js/build.js"></script>
<script type="text/javascript" src="/js/builder.js"></script>
</body>
</html>

View file

@ -17875,17 +17875,17 @@
],
"lvl": 87,
"ids": {
"mr": {
"sdRaw": {
"minimum": 0,
"maximum": 1
"maximum": 100
},
"sdPct": {
"minimum": 0,
"maximum": 10
"maximum": 15
}
},
"itemIDs": {
"dura": -105,
"dura": -100,
"strReq": 0,
"dexReq": 0,
"intReq": 0,
@ -17893,8 +17893,8 @@
"agiReq": 0
},
"consumableIDs": {
"charges": -1,
"dura": -180
"charges": 0,
"dura": -200
},
"posMods": {
"left": 0,
@ -27382,15 +27382,19 @@
"atkTier": {
"minimum": 1,
"maximum": 1
},
"mdPct": {
"minimum": -24,
"maximum": -24
}
},
"itemIDs": {
"dura": -180,
"strReq": 45,
"dexReq": 45,
"intReq": 45,
"defReq": 45,
"agiReq": 45
"strReq": 40,
"dexReq": 40,
"intReq": 40,
"defReq": 40,
"agiReq": 40
},
"consumableIDs": {
"charges": 0,
@ -27449,4 +27453,4 @@
},
"id": 679
}
]
]

File diff suppressed because one or more lines are too long

View file

@ -8,10 +8,10 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="items.css">
<link rel="stylesheet" media="screen and (min-width: 800px)" href="item-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 799px)" href="item-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/css/items.css">
<link rel="stylesheet" media="screen and (min-width: 800px)" href="/css/item-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 799px)" href="/css/item-narrow.css"/>
<link rel="icon" href="./favicon.png">
<link rel="manifest" href="manifest.json">
<title>Wynn Clientside</title>
@ -52,20 +52,20 @@
</div>
</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="powders.js"></script>
<script type="text/javascript" src="load.js"></script>
<script type="text/javascript" src="load_ing.js"></script>
<script type="text/javascript" src="crafter.js"></script>
<script type="text/javascript" src="craft.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="custom.js"></script>
<script type="text/javascript" src="customizer.js"></script>
<script type="text/javascript" src = "item.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/powders.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/load_ing.js"></script>
<script type="text/javascript" src="/js/crafter.js"></script>
<script type="text/javascript" src="/js/craft.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<script type="text/javascript" src="/js/customizer.js"></script>
<script type="text/javascript" src="/js/item.js"></script>
</body>
</html>

View file

@ -9,10 +9,10 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="items.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="items-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="items-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/css/items.css">
<link rel="stylesheet" media="screen and (min-width: 1100px)" href="/css/items-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 1099px)" href="/css/items-narrow.css"/>
<link rel="icon" href="./media/icons/new/searcher.png">
<link rel="manifest" href="manifest.json">
<title>Wynn Clientside</title>
@ -122,15 +122,15 @@
<div class="center items" id="main">
</div>
</div>
<script type="text/javascript" src="/utils.js"></script>
<script type="text/javascript" src="/build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="/damage_calc.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="/display.js"></script>
<script type="text/javascript" src="/query.js"></script>
<script type="text/javascript" src="/load.js"></script>
<script type="text/javascript" src="/items.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/query.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/items.js"></script>
</body>
</html>

View file

@ -9,8 +9,8 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="items_2.css">
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/css/items_2.css">
<link rel="icon" href="./media/icons/new/searcher.png">
<link rel="manifest" href="manifest.json">
<title>WynnAtlas</title>
@ -59,16 +59,16 @@
</div>
</div>
<div id="scroll-up">&uparrow;</div>
<script type="text/javascript" src="utils.js"></script>
<script type="text/javascript" src="build_utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="damage_calc.js"></script>
<script type="text/javascript" src="display_constants.js"></script>
<script type="text/javascript" src="display.js"></script>
<script type="text/javascript" src="query_2.js"></script>
<script type="text/javascript" src="expr_parser.js"></script>
<script type="text/javascript" src="load.js"></script>
<script type="text/javascript" src="items_2.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/build_utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/damage_calc.js"></script>
<script type="text/javascript" src="/js/display_constants.js"></script>
<script type="text/javascript" src="/js/display.js"></script>
<script type="text/javascript" src="/js/query_2.js"></script>
<script type="text/javascript" src="/js/expr_parser.js"></script>
<script type="text/javascript" src="/js/load.js"></script>
<script type="text/javascript" src="/js/items_2.js"></script>
</body>
</html>

View file

@ -72,7 +72,7 @@
</div>
<div class="section">
<h2>Is there a formal specification?</h2>
<p>You can check out the <a class="link" href="https://github.com/wynnbuilder/wynnbuilder.github.io/blob/master/expr_parser.md" target="_blank" rel="noreferrer">implementation notes</a> for the expression parser, as well as the <a class="link" href="https://github.com/wynnbuilder/wynnbuilder.github.io/blob/master/expr_parser.js" target="_blank" rel="noreferrer">parser code itself</a>, over at the WynnBuilder GitHub repository. You can also ask around on the Atlas Inc. Discord server if you want more details.</p>
<p>You can check out the <a class="link" href="https://github.com/wynnbuilder/wynnbuilder.github.io/blob/master/expr_parser.md" target="_blank" rel="noreferrer">implementation notes</a> for the expression parser, as well as the <a class="link" href="https://github.com/wynnbuilder/wynnbuilder.github.io/blob/master/js/expr_parser.js" target="_blank" rel="noreferrer">parser code itself</a>, over at the WynnBuilder GitHub repository. You can also ask around on the Atlas Inc. Discord server if you want more details.</p>
</div>
<div class="section">
<div class="footer">Written by <strong class="heart">Phanta</strong>, the same person who designed the advanced search system!</div>
@ -208,7 +208,7 @@
docsFns.append(genDocEntry(entry[0], entry[1], null, entry[2]));
}
</script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
</body>
</html>

View file

@ -176,6 +176,8 @@ function init() {
});
decodeBuild(url_tag);
populateBuildList();
}
function getItemNameFromID(id) {
@ -885,18 +887,34 @@ function shareBuild() {
}
}
function populateBuildList() {
const buildList = document.getElementById("build-choice");
const savedBuilds = window.localStorage.getItem("builds") === null ? {} : JSON.parse(window.localStorage.getItem("builds"));
for (const buildName of Object.keys(savedBuilds).sort()) {
const buildOption = document.createElement("option");
buildOption.setAttribute("value", buildName);
buildList.appendChild(buildOption);
}
}
function saveBuild() {
if (player_build) {
let savedBuilds = window.localStorage.getItem("builds") === null ? {} : JSON.parse(window.localStorage.getItem("builds"));
let saveName = document.getElementById("build-name").value;
let encodedBuild = encodeBuild();
const savedBuilds = window.localStorage.getItem("builds") === null ? {} : JSON.parse(window.localStorage.getItem("builds"));
const saveName = document.getElementById("build-name").value;
const encodedBuild = encodeBuild();
if ((!Object.keys(savedBuilds).includes(saveName)
|| document.getElementById("saved-error").textContent !== "") && encodedBuild !== "") {
savedBuilds[saveName] = encodedBuild.replace("#", "");
window.localStorage.setItem("builds", JSON.stringify(savedBuilds));
document.getElementById("saved-error").textContent = "";
document.getElementById("saved-build").textContent = "Build saved Locally";
document.getElementById("saved-build").textContent = "Build saved locally";
const buildList = document.getElementById("build-choice");
const buildOption = document.createElement("option");
buildOption.setAttribute("value", saveName);
buildList.appendChild(buildOption);
} else {
document.getElementById("saved-build").textContent = "";
if (encodedBuild === "") {

View file

View file

@ -136,6 +136,77 @@ function displayItems(items_copy) {
let items_expanded;
// updates the current search state from the search query input boxes
function updateSearch() {
// compile query expressions, aborting if nothing has changed or either fails to compile
const changed = searchFilterField.compile() | searchSortField.compile();
if (!changed || searchFilterField.output === null || searchSortField.output === null) return;
// update url query string
const newUrl = `${window.location.protocol}//${window.location.host}${window.location.pathname}`
+ `?f=${encodeURIComponent(searchFilterField.value)}&s=${encodeURIComponent(searchSortField.value)}`;
window.history.pushState({ path: newUrl }, '', newUrl);
// hide old search results
itemListFooter.innerText = '';
for (const itemEntry of itemEntries) itemEntry.classList.remove('visible');
// index and sort search results
const searchResults = [];
try {
for (let i = 0; i < searchDb.length; i++) {
const item = searchDb[i][0], itemExp = searchDb[i][1];
if (checkBool(searchFilterField.output.resolve(item, itemExp))) {
searchResults.push({ item, itemExp, sortKeys: searchSortField.output.resolve(item, itemExp) });
}
}
} catch (e) {
searchFilterField.errorText.innerText = e.message;
return;
}
if (searchResults.length === 0) {
itemListFooter.innerText = 'No results!';
return;
}
try {
searchResults.sort((a, b) => {
try {
return compareLexico(a.item, a.sortKeys, b.item, b.sortKeys);
} catch (e) {
console.log(a.item, b.item);
throw e;
}
});
} catch (e) {
searchSortField.errorText.innerText = e.message;
return;
}
// display search results
const searchMax = Math.min(searchResults.length, ITEM_LIST_SIZE);
for (let i = 0; i < searchMax; i++) {
const result = searchResults[i];
itemEntries[i].classList.add('visible');
displayExpandedItem(result.itemExp, `item-entry-${i}`);
if (result.sortKeys.length > 0) {
const sortKeyListContainer = document.createElement('div');
sortKeyListContainer.classList.add('itemleft');
const sortKeyList = document.createElement('ul');
sortKeyList.classList.add('item-entry-sort-key', 'itemp', 'T0');
sortKeyListContainer.append(sortKeyList);
for (let j = 0; j < result.sortKeys.length; j++) {
const sortKeyElem = document.createElement('li');
sortKeyElem.innerText = stringify(result.sortKeys[j]);
sortKeyList.append(sortKeyElem);
}
itemEntries[i].append(sortKeyListContainer);
}
}
if (searchMax < searchResults.length) {
itemListFooter.innerText = `${searchResults.length - searchMax} more...`;
}
}
function doItemSearch() {
window.scrollTo(0, 0);
let queries = [];

View file

@ -1,4 +1,4 @@
const DB_VERSION = 78;
const DB_VERSION = 80;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.jsA
let db;

View file

@ -1,4 +1,4 @@
const ING_DB_VERSION = 8;
const ING_DB_VERSION = 9;
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.js

View file

@ -19,8 +19,7 @@
<img src = "/media/icons/new/custom.png" class = "left linkoptions headericon">
<div class = "tooltiptext center">WynnCustom</div>
</img>
</a>
<a href = "./map.html" class = "nomarginp iconlink tooltip">
</a> <a href = "./map.html" class = "nomarginp iconlink tooltip">
<img src = "/media/icons/new/compass.png" class = "left linkoptions headericon">
</img>
<div class = "tooltiptext center">WynnGPS</div>
@ -100,4 +99,4 @@ function setHeaders() {
}
setHeaders();
setHeaders();

View file

View file

@ -10,9 +10,9 @@
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" media="screen and (min-width: 900px)" href="map-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 899px)" href="map-narrow.css"/>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" media="screen and (min-width: 900px)" href="/css/map-wide.css"/>
<link rel="stylesheet" media="screen and (max-width: 899px)" href="/css/map-narrow.css"/>
<link rel="icon" href="./media/icons/new/compass2.png">
<link rel="manifest" href="manifest.json">
@ -123,10 +123,10 @@
</div>
<script type = "text/javascript" src="utils.js"></script>
<script type="text/javascript" src="loadheader.js"></script>
<script type="text/javascript" src="icons.js"></script>
<script type = "text/javascript" src="load_map.js"></script>
<script type = "text/javascript" src="map.js"></script>
<script type="text/javascript" src="/js/utils.js"></script>
<script type="text/javascript" src="/js/loadheader.js"></script>
<script type="text/javascript" src="/js/icons.js"></script>
<script type="text/javascript" src="/js/load_map.js"></script>
<script type="text/javascript" src="/js/map.js"></script>
</body>
</html>

View file

@ -44,14 +44,14 @@ def object_diff(obj1, obj2, path):
if type1 != type2:
print(f"{path}.{k}: Type difference [{str(type1)} != {str(type2)}]")
elif type1 is list and type2 is list and not is_basic(type(v[0])):
list_diff(v, obj, path+"."+k)
list_diff(v, obj, path+"."+str(k))
elif (type1 is list and is_basic(type(v[0]))) or is_basic(type1) or v is None or obj2 is None:
if v != obj:
print(f"{path}.{k}: Value difference")
print(f" Left: {shorten(str(v))}")
print(f" Right: {shorten(str(obj))}")
else:
object_diff(v, obj, path+"."+k)
object_diff(v, obj, path+"."+str(k))
else:
print(f"{path}.{k}: Contained in left but not right")
print(f" Value: {shorten(str(v))}")