Move javascript files into their own folder
This commit is contained in:
parent
9602bd49c0
commit
28a1e81a6c
40 changed files with 181 additions and 1142 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
24
crafter.html
24
crafter.html
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
30
index.html
30
index.html
|
@ -1012,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>
|
||||
|
|
30
item.html
30
item.html
|
@ -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>
|
||||
|
|
20
items.html
20
items.html
|
@ -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>
|
||||
|
|
22
items_2.html
22
items_2.html
|
@ -59,16 +59,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="scroll-up">↑</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 = [];
|
|
@ -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();
|
10
map.html
10
map.html
|
@ -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>
|
||||
|
|
1031
test/index.html
1031
test/index.html
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue