added preliminary TOTK editor
92
zelda-totk/_cache_service_worker.js
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
Cache Service Worker template by mrc 2019
|
||||
mostly based in:
|
||||
https://github.com/GoogleChrome/samples/blob/gh-pages/service-worker/basic/service-worker.js
|
||||
https://github.com/chriscoyier/Simple-Offline-Site/blob/master/js/service-worker.js
|
||||
https://gist.github.com/kosamari/7c5d1e8449b2fbc97d372675f16b566e
|
||||
|
||||
Note for GitHub Pages:
|
||||
there can be an unexpected behaviour (cache not updating) when site is accessed from
|
||||
https://user.github.io/repo/ (without index.html) in some browsers (Firefox)
|
||||
use absolute paths if hosted in GitHub Pages in order to avoid it
|
||||
also invoke sw with an absolute path:
|
||||
navigator.serviceWorker.register('/repo/_cache_service_worker.js', {scope: '/repo/'})
|
||||
*/
|
||||
|
||||
|
||||
/* MOD: fix old caches for mrc */
|
||||
caches.keys().then(function(cacheNames){
|
||||
for(var i=0; i<cacheNames.length; i++){
|
||||
if(
|
||||
cacheNames[i]==='runtime' ||
|
||||
/^precache-\w+$/.test(cacheNames[i]) ||
|
||||
/^precache-editor-([\w\+]+)-\w+$/.test(cacheNames[i]) ||
|
||||
/^v?\d+\w?$/.test(cacheNames[i])
|
||||
){
|
||||
console.log('deleting old cache: '+cacheNames[i]);
|
||||
caches.delete(cacheNames[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var PRECACHE_ID='zelda-totk-editor';
|
||||
var PRECACHE_VERSION='v0a';
|
||||
var PRECACHE_URLS=[
|
||||
//is hashes file too big for cacheing?
|
||||
'/savegame-editors/zelda-totk/','/savegame-editors/zelda-totk/index.html',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.css',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.js',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.data.js',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.icons.js',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.locations.js',
|
||||
'/savegame-editors/zelda-totk/zelda-totk.master.js',
|
||||
'/savegame-editors/zelda-totk/favicon.png',
|
||||
'/savegame-editors/zelda-totk/assets/_blank.png',
|
||||
'/savegame-editors/zelda-totk/assets/logo.png',
|
||||
'/savegame-editors/zelda-totk/assets/tabs.png',
|
||||
'/savegame-editors/zelda-totk/assets/bg_black.jpg',
|
||||
'/savegame-editors/zelda-totk/assets/bg_white.jpg',
|
||||
'/savegame-editors/savegame-editor.js'
|
||||
];
|
||||
|
||||
|
||||
|
||||
// install event (fired when sw is first installed): opens a new cache
|
||||
self.addEventListener('install', evt => {
|
||||
evt.waitUntil(
|
||||
caches.open('precache-'+PRECACHE_ID+'-'+PRECACHE_VERSION)
|
||||
.then(cache => cache.addAll(PRECACHE_URLS))
|
||||
.then(self.skipWaiting())
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
// activate event (fired when sw is has been successfully installed): cleans up old outdated caches
|
||||
self.addEventListener('activate', evt => {
|
||||
evt.waitUntil(
|
||||
caches.keys().then(cacheNames => {
|
||||
return cacheNames.filter(cacheName => (cacheName.startsWith('precache-'+PRECACHE_ID+'-') && !cacheName.endsWith('-'+PRECACHE_VERSION)));
|
||||
}).then(cachesToDelete => {
|
||||
return Promise.all(cachesToDelete.map(cacheToDelete => {
|
||||
console.log('delete '+cacheToDelete);
|
||||
return caches.delete(cacheToDelete);
|
||||
}));
|
||||
}).then(() => self.clients.claim())
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
// fetch event (fired when requesting a resource): returns cached resource when possible
|
||||
self.addEventListener('fetch', evt => {
|
||||
if(evt.request.url.startsWith(self.location.origin)){ //skip cross-origin requests
|
||||
evt.respondWith(
|
||||
caches.match(evt.request).then(cachedResource => {
|
||||
if (cachedResource) {
|
||||
return cachedResource;
|
||||
}else{
|
||||
return fetch(evt.request);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
BIN
zelda-totk/assets/_blank.png
Normal file
After Width: | Height: | Size: 456 B |
BIN
zelda-totk/assets/bg_black.jpg
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
zelda-totk/assets/bg_white.jpg
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
zelda-totk/assets/logo.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
zelda-totk/assets/tabs.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
zelda-totk/favicon.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
362
zelda-totk/index.html
Normal file
@ -0,0 +1,362 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Savegame Editor – The legend of Zelda: Tears of the Kingdom</title>
|
||||
<meta http-equiv="content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="description" content="A savegame editor for The legend of Zelda: Tears of the Kingdom. Alpha version."/>
|
||||
<meta name="keywords" content="html5, savegame, save, editor, hack, exploit, switch, zelda, tears of the kingdom, totk, weapon, durability, modifier, horse, epona, korok, unlocker, dlc, amiibo"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="shortcut icon" href="./favicon.png"/>
|
||||
<link type="text/css" rel="stylesheet" href="./zelda-totk.css" media="all"/>
|
||||
<script type="text/javascript" src="../savegame-editor.js"></script>
|
||||
<script type="text/javascript" src="./zelda-totk.js"></script>
|
||||
<script type="text/javascript" src="./zelda-totk.data.js"></script>
|
||||
<script type="text/javascript" src="./zelda-totk.locations.js"></script>
|
||||
<script type="text/javascript" src="./zelda-totk.icons.js"></script>
|
||||
<script type="text/javascript" src="./zelda-totk.master.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
/* service worker */
|
||||
/*var FORCE_HTTPS=true;
|
||||
window.addEventListener('load',function(){
|
||||
if(location.protocol==='http:' && FORCE_HTTPS)
|
||||
location.replace(window.location.href.replace('http:','https:'));
|
||||
else if(location.protocol==='https:' && 'serviceWorker' in navigator)
|
||||
navigator.serviceWorker.register('/savegame-editors/zelda-totk/_cache_service_worker.js', {scope: '/savegame-editors/zelda-totk/'});
|
||||
}, false);*/
|
||||
--></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- HEADER -->
|
||||
<div id="header">
|
||||
<div id="header-top">
|
||||
<div class="row wrapper padding-vertical">
|
||||
<h1>Savegame Editor for The legend of Zelda: TOTK</h1>
|
||||
<div class="six columns text-left"><img src="./assets/logo.png" style="max-width:90%"/></div>
|
||||
<div class="six columns text-right header-buttons">
|
||||
by <a href="/" class="author">Marc Robledo</a>
|
||||
<a href="https://github.com/marcrobledo/savegame-editors/tree/master/zelda-totk" target="_blank" class="button"><span class="sprite github"></span> See on GitHub</a>
|
||||
<a href="https://www.paypal.me/marcrobledo/5" target="_blank" rel="nofollow" class="donate button"><span class="sprite heart"></span> Donate</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toolbar" class="hidden padding-vertical">
|
||||
<div class="row wrapper">
|
||||
<div class="twelve columns text-center">
|
||||
<span id="span-version"></span>
|
||||
|
|
||||
<button id="tab-button-home" title="Home" class="tab-button active" onclick="showTab('home')"><i class="tab-icon home"></i></button>
|
||||
<button id="tab-button-weapons" title="Weapons" class="tab-button" onclick="showTab('weapons')" disabled><i class="tab-icon weapons"></i></button>
|
||||
<button id="tab-button-bows" title="Bows" class="tab-button" onclick="showTab('bows')" disabled><i class="tab-icon bows"></i></button>
|
||||
<button id="tab-button-shields" title="Shields" class="tab-button" onclick="showTab('shields')" disabled><i class="tab-icon shields"></i></button>
|
||||
<button id="tab-button-clothes" title="Clothes" class="tab-button" onclick="showTab('clothes')" disabled><i class="tab-icon clothes"></i></button>
|
||||
<button id="tab-button-materials" title="Materials" class="tab-button" onclick="showTab('materials')" disabled><i class="tab-icon materials"></i></button>
|
||||
<button id="tab-button-food" title="Food" class="tab-button" onclick="showTab('food')" disabled><i class="tab-icon food"></i></button>
|
||||
<button id="tab-button-other" title="Other" class="tab-button" onclick="showTab('other')" disabled><i class="tab-icon other"></i></button>
|
||||
<button id="tab-button-horses" title="Horses" class="tab-button" onclick="showTab('horses')" disabled><i class="tab-icon horses"></i></button>
|
||||
<button id="tab-button-master" title="Master editor" class="tab-button" onclick="showTab('master')" disabled><i class="tab-icon master"></i></button>
|
||||
| <button class="button with-icon icon3" onclick="closeFile()">Close file</button>
|
||||
<button class="button colored blue with-icon icon9" onclick="saveChanges()">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- THE EDITOR -->
|
||||
<div id="the-editor" class="wrapper hidden">
|
||||
<!-- DEBUG -->
|
||||
<div id="debug"></div>
|
||||
|
||||
<!-- TAB: HOME -->
|
||||
<div id="tab-home">
|
||||
<!-- RUPEES -->
|
||||
<h3 class="border-red">Stats</h3>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-rupees">Rupees</label></div>
|
||||
<div class="two columns"><input id="number-rupees" class="full-width" type="text" /></div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-mons">Mons</label></div>
|
||||
<div class="two columns"><input id="number-mons" class="full-width" type="text" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-relic-gerudo">Gerudo relic remaining uses</label></div>
|
||||
<div class="two columns text-right"><input id="number-relic-gerudo" class="small" type="text" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-relic-goron">Goron relic remaining uses</label></div>
|
||||
<div class="two columns text-right"><input id="number-relic-goron" class="small" type="text" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-relic-rito">Rito relic remaining uses</label></div>
|
||||
<div class="two columns text-right"><input id="number-relic-rito" class="small" type="text" /></div>
|
||||
</div>
|
||||
<div class="row" id="row-motorcycle">
|
||||
<div class="ten columns"><label for="checkbox-motorcycle">Motorcycle</label></div>
|
||||
<div class="two columns text-right"><input id="checkbox-motorcycle" type="checkbox" value="1" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="number-playtime">Playtime</label></div>
|
||||
<div class="two columns"><input type="text" id="number-playtime" class="text-right full-width" disabled /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="select-max-hearts">Max. hearts</label></div>
|
||||
<div class="two columns">
|
||||
<select id="select-max-hearts" class="full-width">
|
||||
<option value="4">1</option>
|
||||
<option value="8">2 hearts</option>
|
||||
<option value="12">3 hearts</option>
|
||||
<option value="16">4 hearts</option>
|
||||
<option value="20">5 hearts</option>
|
||||
<option value="24">6 hearts</option>
|
||||
<option value="28">7 hearts</option>
|
||||
<option value="32">8 hearts</option>
|
||||
<option value="36">9 hearts</option>
|
||||
<option value="40">10 hearts</option>
|
||||
<option value="44">11 hearts</option>
|
||||
<option value="48">12 hearts</option>
|
||||
<option value="52">13 hearts</option>
|
||||
<option value="56">14 hearts</option>
|
||||
<option value="60">15 hearts</option>
|
||||
<option value="64">16 hearts</option>
|
||||
<option value="68">17 hearts</option>
|
||||
<option value="72">18 hearts</option>
|
||||
<option value="76">19 hearts</option>
|
||||
<option value="80">20 hearts</option>
|
||||
<option value="84">21 hearts</option>
|
||||
<option value="88">22 hearts</option>
|
||||
<option value="92">23 hearts</option>
|
||||
<option value="96">24 hearts</option>
|
||||
<option value="100">25 hearts</option>
|
||||
<option value="104">26 hearts</option>
|
||||
<option value="108">27 hearts</option>
|
||||
<option value="112">28 hearts</option>
|
||||
<option value="116">29 hearts</option>
|
||||
<option value="120">30 hearts</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="ten columns"><label for="select-max-stamina">Max. stamina </label></div>
|
||||
<div class="two columns">
|
||||
<select id="select-max-stamina" class="full-width">
|
||||
<option value="1148846080">1 wheel</option>
|
||||
<option value="1150681088">1 wheel+1/5</option>
|
||||
<option value="1152319488">1 wheel+2/5</option>
|
||||
<option value="1153957888">1 wheel+3/5</option>
|
||||
<option value="1155596288">1 wheel+4/5</option>
|
||||
<option value="1157234688">2 wheels</option>
|
||||
<option value="1158250496">2 wheels+1/5</option>
|
||||
<option value="1159069696">2 wheels+2/5</option>
|
||||
<option value="1159888896">2 wheels+3/5</option>
|
||||
<option value="1160708096">2 wheels+4/5</option>
|
||||
<option value="1161527296">3 wheels</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!-- Coordinates (Requires a memory editor) -->
|
||||
<!-- <h3 class="border-green">Coordinates</h3>
|
||||
<div class="row">
|
||||
<div class="six columns"><label for="float-pos-x">Current Link coordinates (XYZ)</label></div>
|
||||
<div class="two columns"><input id="float-pos-x" onchange="guessMainFieldGrid()" class="full-width" type="text" /></div>
|
||||
<div class="two columns"><input id="float-pos-y" onchange="guessMainFieldGrid()" class="full-width" type="text" /></div>
|
||||
<div class="two columns"><input id="float-pos-z" onchange="guessMainFieldGrid()" class="full-width" type="text" /></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="six columns"><label for="select-pos-maptype">Map</label></div>
|
||||
<div class="three columns"><select id="select-pos-maptype"></select></div>
|
||||
<div class="three columns"><select id="select-pos-map"></select></div>
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- COMPLETIONISM -->
|
||||
<!-- <h3 class="border-blue">Completionism</h3>
|
||||
<div class="row">
|
||||
<div class="seven columns"><label for="number-koroks">Korok seeds</label></div>
|
||||
<div class="five columns text-right">
|
||||
<input type="text" id="number-koroks" style="width:50px" disabled />
|
||||
<button onclick="unlockKoroks()">Get all</button>
|
||||
<button onclick="addKoroksToMap()">Add pins to Map</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="seven columns"><label for="number-defeated-hinox">Defeated Hinox</label></div>
|
||||
<div class="five columns text-right">
|
||||
<input type="text" id="number-defeated-hinox" style="width:50px" disabled />
|
||||
<button onclick="defeatAllHinox()">Defeat all</button>
|
||||
<button onclick="addHinoxToMap()">Add pins to Map</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="seven columns"><label for="number-defeated-talus">Defeated Talus</label></div>
|
||||
<div class="five columns text-right">
|
||||
<input type="text" id="number-defeated-talus" style="width:50px" disabled />
|
||||
<button onclick="defeatAllTalus()">Defeat all</button>
|
||||
<button onclick="addTalusToMap()">Add pins to Map</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="seven columns"><label for="number-defeated-molduga">Defeated Molduga</label></div>
|
||||
<div class="five columns text-right">
|
||||
<input type="text" id="number-defeated-molduga" style="width:50px" disabled />
|
||||
<button onclick="defeatAllMolduga()">Defeat all</button>
|
||||
<button onclick="addMoldugaToMap()">Add pins to Map</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="nine columns"><label for="number-defeated-molduga">Hyrule Compendium</label></div>
|
||||
<div class="three columns text-right">
|
||||
<button onclick="setCompendiumToStock()">Set to stock</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="seven columns">Visited locations</div>
|
||||
<div class="five columns text-right">
|
||||
<button onclick="visitAllLocations()">Visit all</button>
|
||||
<button onclick="addLocationsToMap()">Add pins to Map</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="nine columns">Map Pins</div>
|
||||
<div class="three columns text-right">
|
||||
<input type="text" id="number-map-pins" style="width:50px" disabled />
|
||||
<button onclick="clearMapPins()">Clear</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- TAB: WEAPONS -->
|
||||
<div id="tab-weapons">
|
||||
<h3>Weapons</h3><div id="container-weapons"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: BOWS -->
|
||||
<div id="tab-bows">
|
||||
<h3>Bows</h3><div id="container-bows"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: SHIELDS -->
|
||||
<div id="tab-shields">
|
||||
<h3>Shields</h3><div id="container-shields"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: CLOTHES -->
|
||||
<div id="tab-clothes">
|
||||
<h3>Clothes</h3><div id="container-clothes"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: MATERIALS -->
|
||||
<div id="tab-materials">
|
||||
<h3>Materials</h3><div id="container-materials"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: FOOD -->
|
||||
<div id="tab-food">
|
||||
<h3>Food</h3><div id="container-food"></div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: OTHER -->
|
||||
<div id="tab-other">
|
||||
<h3>Other</h3><div id="container-other"></div>
|
||||
</div>
|
||||
|
||||
<!-- ADD ITEM BUTTON -->
|
||||
<div id="add-item-button" class="text-center">
|
||||
<button class="with-icon icon1" onclick="SavegameEditor.addItem()">Add item</button>
|
||||
</div>
|
||||
<!-- TAB: HORSES -->
|
||||
<div id="tab-horses">
|
||||
<h3 class="border-blue">Horses</h3>
|
||||
<div class="row"><div class="twelve columns">Horse #1</div></div>
|
||||
<div class="row" id="row-horse0">
|
||||
<div class="three columns"><select id="select-horse0-type"></select></div>
|
||||
<div class="three columns"><input type="text" id="input-horse0-name" /></div>
|
||||
<div class="three columns"><select id="select-horse0-saddles"></select></div>
|
||||
<div class="three columns"><select id="select-horse0-reins"></select></div>
|
||||
</div>
|
||||
<div class="row"><div class="twelve columns">Horse #2</div></div>
|
||||
<div class="row" id="row-horse1">
|
||||
<div class="three columns"><select id="select-horse1-type"></select></div>
|
||||
<div class="three columns"><input type="text" id="input-horse1-name" /></div>
|
||||
<div class="three columns"><select id="select-horse1-saddles"></select></div>
|
||||
<div class="three columns"><select id="select-horse1-reins"></select></div>
|
||||
</div>
|
||||
<div class="row"><div class="twelve columns">Horse #3</div></div>
|
||||
<div class="row" id="row-horse2">
|
||||
<div class="three columns"><select id="select-horse2-type"></select></div>
|
||||
<div class="three columns"><input type="text" id="input-horse2-name" /></div>
|
||||
<div class="three columns"><select id="select-horse2-saddles"></select></div>
|
||||
<div class="three columns"><select id="select-horse2-reins"></select></div>
|
||||
</div>
|
||||
<div class="row"><div class="twelve columns">Horse #4</div></div>
|
||||
<div class="row" id="row-horse3">
|
||||
<div class="three columns"><select id="select-horse3-type"></select></div>
|
||||
<div class="three columns"><input type="text" id="input-horse3-name" /></div>
|
||||
<div class="three columns"><select id="select-horse3-saddles"></select></div>
|
||||
<div class="three columns"><select id="select-horse3-reins"></select></div>
|
||||
</div>
|
||||
<div class="row"><div class="twelve columns">Horse #5</div></div>
|
||||
<div class="row" id="row-horse4">
|
||||
<div class="three columns"><select id="select-horse4-type"></select></div>
|
||||
<div class="three columns"><input type="text" id="input-horse4-name" /></div>
|
||||
<div class="three columns"><select id="select-horse4-saddles"></select></div>
|
||||
<div class="three columns"><select id="select-horse4-reins"></select></div>
|
||||
</div>
|
||||
<div class="row"><div class="twelve columns">Untammed horse</div></div>
|
||||
<div class="row" id="row-horse5">
|
||||
<div class="three columns end"><select id="select-horse5-type"></select></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="six columns"><label for="float-pos-x-horse">Current horse coordinates (XYZ)</label></div>
|
||||
<div class="two columns"><input id="float-pos-x-horse" class="full-width" type="text" /></div>
|
||||
<div class="two columns"><input id="float-pos-y-horse" class="full-width" type="text" /></div>
|
||||
<div class="two columns"><input id="float-pos-z-horse" class="full-width" type="text" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TAB: MASTER EDITOR -->
|
||||
<div id="tab-master">
|
||||
<div id="master-editor-loading" class="text-center">Master editor is loading...</div>
|
||||
<div id="master-editor-hidden" class="hidden">
|
||||
<label for="select-filters">Filter: </label>
|
||||
<select id="select-filters" onchange="TOTKMasterEditor.refreshResults()">
|
||||
<option value="">- All -</option>
|
||||
<!-- <option value="WolfLink_|Amiibo">Amiibo</option>
|
||||
<option value="_DispNameFlag$">Display flag names</option>
|
||||
<option value="100enemy">DLC1</option>
|
||||
<option value="Motorcycle">DLC2</option>
|
||||
<option value="Horse_">Horses</option>
|
||||
<option value="Defeat_Enemy_|Defeated.+Num">Defeated enemies</option>
|
||||
<option value="Porch|Cook">Items</option>
|
||||
<option value="IsGet_">Get flags</option>
|
||||
<option value="HiddenKorok|OldKorok_">Korok</option>
|
||||
<option value="^Location_">Visited locations</option>
|
||||
<option value="AlbumPicture|PictureBook">Compendium</option> -->
|
||||
</select>
|
||||
<input id="input-custom-filter" type="text" placeholder="Search hash keys" onchange="TOTKMasterEditor.refreshResults()" />
|
||||
|
||||
| <label for="select-page">Page: </label>
|
||||
<button id="page-prev" onclick="TOTKMasterEditor.prevPage()">«</button>
|
||||
<select id="select-page" class="small" onchange="TOTKMasterEditor.setPage(this.selectedIndex)"></select>
|
||||
<button id="page-next" onclick="TOTKMasterEditor.nextPage()">»</button>
|
||||
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
zelda-totk/thumb.jpg
Normal file
After Width: | Height: | Size: 51 KiB |
680
zelda-totk/zelda-totk.css
Normal file
@ -0,0 +1,680 @@
|
||||
/* Zelda TOTK Savegame editor by Marc Robledo v20230505 */
|
||||
/* minify at https://cssminifier.com/ + https://www.base64-image.de/ (sprites */
|
||||
|
||||
/* @FONT-FACES */
|
||||
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,800');
|
||||
|
||||
|
||||
body{
|
||||
font:15px 'Open Sans',sans-serif;
|
||||
cursor:default;
|
||||
margin:180px 0 80px;
|
||||
background-color:#160c0c;
|
||||
color:#f9f5da;
|
||||
background-image:url(assets/bg_black.jpg);
|
||||
}
|
||||
|
||||
/* master editor */
|
||||
#toolbar select{width:initial !important}
|
||||
#page-prev,#page-next{min-width:initial !important}
|
||||
table{
|
||||
border-collapse:collapse;
|
||||
}
|
||||
tr{border-bottom:1px solid #452e2e;height:36px}
|
||||
tr:last-child{border-bottom:none}
|
||||
tr:hover{background-color:#250e0e}
|
||||
|
||||
|
||||
|
||||
/* flex box */
|
||||
.row{
|
||||
display:flex;
|
||||
flex-flow:row wrap; /* this is the same as flex-direction:row;flex-wrap:wrap; */
|
||||
align-items:center; /* vertical align */
|
||||
justify-content:space-between
|
||||
}
|
||||
.columns.c1,.columns.one{width:7.33333%}
|
||||
.columns.c2,.columns.two{width:15.66667%}
|
||||
.columns.c3,.columns.three{width:24%}
|
||||
.columns.c4,.columns.four{width:32.33333%}
|
||||
.columns.c5,.columns.five{width:40.66667%}
|
||||
.columns.c6,.columns.six{width:49%}
|
||||
.columns.c7,.columns.seven{width:57.33333%}
|
||||
.columns.c8,.columns.eight{width:65.66667%}
|
||||
.columns.c9,.columns.nine{width:74%}
|
||||
.columns.c10,.columns.ten{width:82.33333%}
|
||||
.columns.c11,.columns.eleven{width:90.66667%}
|
||||
.columns.c12,.columns.twelve{width:99%}
|
||||
|
||||
/* grid box */
|
||||
.row-items{
|
||||
background-color:rgba(0,0,0,.4);
|
||||
position:relative;
|
||||
margin-bottom:4px;
|
||||
padding:10px;
|
||||
}
|
||||
.row-items img{max-width:100%}
|
||||
.row-items .item-name:hover{text-decoration:underline}
|
||||
.item-number{position:absolute;top:0;left:0; color:#444;font-family:monospace;font-size:80%}
|
||||
.tiles span{display:block}
|
||||
|
||||
/* useful classes */
|
||||
.help:hover{cursor:help}
|
||||
.hidden{display:none}
|
||||
.mono{}
|
||||
.clickable{cursor:pointer} /* also Safari iOS fix for clickable elements */
|
||||
.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.text-left{text-align:left}
|
||||
.text-right{text-align:right}
|
||||
.text-center{text-align:center}
|
||||
.text-justify{text-align:justify}
|
||||
.padding-vertical{padding:20px 0}
|
||||
.round{border-radius:3px}
|
||||
/* colors */
|
||||
.bg-light-gray{background-color:rgba(216,216,216,.99)}
|
||||
.bg-mid-gray{background-color:rgba(144,144,144,.99);color:white}
|
||||
.bg-dark-gray{background-color:rgba(72,72,72,.99);color:white}
|
||||
.bg-red{background-color:#e74c3c}
|
||||
.bg-orange{background-color:#f39c12}
|
||||
.bg-blue{background-color:#3498db}
|
||||
.bg-green{background-color:#25ba84}
|
||||
.fnt-white{color:white}
|
||||
.fnt-light-gray{color:#d8d8d8}
|
||||
.fnt-mid-gray{color:#909090}
|
||||
.fnt-dark-gray{color:#48484}
|
||||
.fnt-red{color:#e74c3c}
|
||||
/*.fnt-red{color:#fe5d05}*/
|
||||
.fnt-orange{color:#f39c12}
|
||||
/*.fnt-orange{color:#feb806}*/
|
||||
.fnt-blue{color:#3498db}
|
||||
.fnt-green{color:#25ba84}
|
||||
/*.fnt-green{color:#9ac430}*/
|
||||
.border-white{border-color:white}
|
||||
.border-light-gray{border-color:#d8d8d8}
|
||||
.border-mid-gray{border-color:#909090}
|
||||
.border-dark-gray{border-color:#48484}
|
||||
.border-red{border-color:#e74c3c}
|
||||
.border-orange{border-color:#f39c12}
|
||||
.border-blue{border-color:#3498db}
|
||||
.border-green{border-color:#25ba84}
|
||||
|
||||
/* Icons */
|
||||
span.sprite,span.icon,button.with-icon:before{
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAABECAQAAAB99PJCAAAOMUlEQVR42u1cC3RTRRpOX/hcsGcRRXysngNoWdtuM0mharUFi0ILapXaQy0oLAoCCyILWDCoLCCusrq+wEVBq1BclbPuCrVSBAVXjkBp6RMEKn3a0iRt7SNN7r9z507uI3duk9A0jXuS/7Tcmf/euTPfN/8//8yfogMdAqTxAzp/CJLkE2RHjVJZpg1Dj6B8ZMb9sqACNAOFS3f4rXdKWYaOoCs17rgZnUHZtP8fIw73mpcQorsKzcYyAq3ENZ+Cjr6E/aPqjNBQfwxxGhqCBqEy3LoDX0VguENlBIxGx+i7nVKMxgwoASbSi2Mad7yHdXaUJcNMIuB2cp1CCABCAJntLAFfEiC8ThyUsrQcl8+gBtp+KyrBv7eiUKodjZpc4OflPE+Bz4EGAQ03BKyhfVjFuON36F/oWvQF1lZ7SIAWy761AOFZ9TUuDUYtDIC70c1EGybO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MQz0j4IJFgwAKe5CAIAFBAoIE9C8B3R4R0B2Eur8IyNF3MQiI1BuI6GhKcnUQarb8D1Y8dNzm1WVIAAAAAElFTkSuQmCC');
|
||||
background-position:0px 0px;
|
||||
display:inline-block;
|
||||
vertical-align:middle
|
||||
}
|
||||
span.sprite{width:24px;height:24px}
|
||||
span.icon,button.with-icon:before{
|
||||
width:16px;height:16px;
|
||||
margin-right:4px;
|
||||
content:""
|
||||
}
|
||||
button.with-icon.icon0:before{background-position:-0px -16px}
|
||||
button.with-icon.icon1:before{background-position:-16px -16px}
|
||||
button.with-icon.icon2:before{background-position:-32px -16px}
|
||||
button.with-icon.icon3:before{background-position:-48px -16px}
|
||||
button.with-icon.icon4:before{background-position:-64px -16px}
|
||||
button.with-icon.icon5:before{background-position:-80px -16px}
|
||||
button.with-icon.icon6:before{background-position:-96px -16px}
|
||||
button.with-icon.icon7:before{background-position:-112px -16px}
|
||||
button.with-icon.icon8:before{background-position:-128px -16px}
|
||||
button.with-icon.icon9:before{background-position:-144px -16px}
|
||||
button.with-icon.icon10:before{background-position:-160px -16px}
|
||||
button.with-icon.colored.icon0:before{background-position:-0px -32px}
|
||||
button.with-icon.colored.icon1:before{background-position:-16px -32px}
|
||||
button.with-icon.colored.icon2:before{background-position:-32px -32px}
|
||||
button.with-icon.colored.icon3:before{background-position:-48px -32px}
|
||||
button.with-icon.colored.icon4:before{background-position:-64px -32px}
|
||||
button.with-icon.colored.icon5:before{background-position:-80px -32px}
|
||||
button.with-icon.colored.icon6:before{background-position:-96px -32px}
|
||||
button.with-icon.colored.icon7:before{background-position:-112px -32px}
|
||||
button.with-icon.colored.icon8:before{background-position:-128px -32px}
|
||||
button.with-icon.colored.icon9:before{background-position:-144px -32px}
|
||||
button.with-icon.colored.icon10:before{background-position:-160px -32px}
|
||||
span.icon.icon0,button.with-icon.transparent.icon0:before{background-position:-0px 0px}
|
||||
span.icon.icon1,button.with-icon.transparent.icon1:before{background-position:-16px 0px}
|
||||
span.icon.icon2,button.with-icon.transparent.icon2:before{background-position:-32px 0px}
|
||||
span.icon.icon3,button.with-icon.transparent.icon3:before{background-position:-48px 0px}
|
||||
span.icon.icon4,button.with-icon.transparent.icon4:before{background-position:-64px 0px}
|
||||
span.icon.icon5,button.with-icon.transparent.icon5:before{background-position:-80px 0px}
|
||||
span.icon.icon6,button.with-icon.transparent.icon6:before{background-position:-96px 0px}
|
||||
span.icon.icon7,button.with-icon.transparent.icon7:before{background-position:-112px 0px}
|
||||
span.icon.icon8,button.with-icon.transparent.icon8:before{background-position:-128px 0px}
|
||||
span.icon.icon9,button.with-icon.transparent.icon9:before{background-position:-144px 0px}
|
||||
span.icon.icon10,button.with-icon.transparent.icon10:before{background-position:-160px 0px}
|
||||
span.sprite{width:24px;height:24px}
|
||||
span.sprite.github{background-position:0px -48px;width:16px;height:16px; margin-right:5px}
|
||||
span.sprite.heart{background-position:-16px -48px;width:16px;height:16px; margin-right:5px}
|
||||
button.with-icon.file-load:before{background-position:-32px -48px;width:20px;height:20px; margin-right:8px}
|
||||
|
||||
.tab-button{
|
||||
padding:2px;
|
||||
margin:0 2px;
|
||||
min-width:1px;
|
||||
line-height:0;
|
||||
}
|
||||
.tab-button.active{
|
||||
border-color:#d3af61;
|
||||
background-color: white;
|
||||
}
|
||||
i.tab-icon{
|
||||
display:inline-block;
|
||||
width:32px;height:32px;
|
||||
background-image:url('assets/tabs.png');
|
||||
background-size:320px;
|
||||
}
|
||||
i.tab-icon.home{background-position-x:-0px;}
|
||||
i.tab-icon.weapons{background-position-x:-32px;}
|
||||
i.tab-icon.bows{background-position-x:-64px;}
|
||||
i.tab-icon.shields{background-position-x:-96px;}
|
||||
i.tab-icon.clothes{background-position-x:-128px;}
|
||||
i.tab-icon.materials{background-position-x:-160px;}
|
||||
i.tab-icon.food{background-position-x:-192px;}
|
||||
i.tab-icon.other{background-position-x:-224px;}
|
||||
i.tab-icon.horses{background-position-x:-256px;}
|
||||
i.tab-icon.master{background-position-x:-288px;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* header+toolbar+footer */
|
||||
#header{
|
||||
color:#333;
|
||||
position:absolute;
|
||||
top:0;left:0;
|
||||
width:100%;
|
||||
z-index:100;
|
||||
background-color:#faf8f7;
|
||||
background-image:url(assets/bg_white.jpg);
|
||||
}
|
||||
#header:after{
|
||||
display:block;
|
||||
position:absolute;
|
||||
bottom:-3px;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:3px;
|
||||
background-image:linear-gradient(to right, #0f0404 0%, #b99f65 40%, #b99f65 40%, #b99f65 65%, #0f0404 100%);
|
||||
|
||||
content:"";
|
||||
}
|
||||
#toolbar{
|
||||
padding:8px
|
||||
}
|
||||
#span-version:hover{text-decoration:underline}
|
||||
#header h1{display:none}
|
||||
#header h1 img{vertical-align:middle}
|
||||
|
||||
|
||||
|
||||
.header-buttons{
|
||||
font-size:85%
|
||||
}
|
||||
.header-buttons a.author{
|
||||
color:#333;
|
||||
text-decoration:none;
|
||||
border-bottom:1px solid #d3cec3;
|
||||
margin-right:10px
|
||||
}
|
||||
.header-buttons a.author:hover{
|
||||
border-color:#83d8ff
|
||||
}
|
||||
.header-buttons a.button{
|
||||
text-decoration:none;
|
||||
color:white;
|
||||
background-color:#1a415d;
|
||||
padding:10px 20px;
|
||||
border-radius:3px
|
||||
}
|
||||
.header-buttons a.button:hover{
|
||||
background-color:#153044
|
||||
}
|
||||
|
||||
.donate.button{
|
||||
background-color:#51a451 !important;
|
||||
|
||||
/*text-shadow:0 -1px 0 #37a137 !important;
|
||||
background:radial-gradient(#60bd60,#398a39);*/
|
||||
animation:donateglow 2s infinite
|
||||
}
|
||||
.donate.button:hover{background-color:#3e903e !important}
|
||||
@keyframes donateglow{
|
||||
0%{box-shadow:none}
|
||||
50%{box-shadow:#d8ff7c 0 0 8px inset}
|
||||
100%{box-shadow:none}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
hr{border:none;border-top:1px dotted #bbb;margin:15px 0}
|
||||
h3{
|
||||
border-bottom:2px solid #888;
|
||||
font-size:135%;
|
||||
padding:10px 0;
|
||||
text-transform:uppercase;
|
||||
color:#b99f65
|
||||
}
|
||||
|
||||
table{width:100%}
|
||||
/*tbody tr:nth-child(even){background-color:#f2f2f2}*/
|
||||
th{background-color:#d4d4d4}
|
||||
|
||||
|
||||
|
||||
|
||||
/* forms */
|
||||
input[type=text],input[type=number],select{
|
||||
padding:6px 8px;
|
||||
width:250px;
|
||||
max-width:90%;
|
||||
font:100% 'Open Sans', sans-serif;
|
||||
border:1px solid #888;
|
||||
border-radius:2px;
|
||||
box-sizing:border-box
|
||||
}
|
||||
input[type=text]:hover,input[type=number]:hover,select:hover{
|
||||
border-color:#666
|
||||
}
|
||||
input[type=text]:focus,input[type=number]:focus,select:focus{
|
||||
box-shadow:#63bce5 0 0 4px 1px;
|
||||
border-color:#47a8df
|
||||
}
|
||||
input[type=text].error,input[type=number].error,select.error{
|
||||
box-shadow:#f88 0 0 4px 1px;
|
||||
border-color:red
|
||||
}
|
||||
input[type=text].small,input[type=number].small,select.small{width:70px}
|
||||
input[type=text].medium,input[type=number].medium,select.medium{width:130px}
|
||||
.full-width{width:100% !important;max-width:100% !important}
|
||||
optgroup{background-color:black}
|
||||
|
||||
#the-editor input[type=text],#the-editor input[type=number],#the-editor select{
|
||||
border:1px solid #444;
|
||||
border-radius:2px;
|
||||
background-color:#111;
|
||||
color:white;
|
||||
}
|
||||
#the-editor input[type=text]:hover,#the-editor input[type=number]:hover,#the-editor select:hover{
|
||||
border-color:#666
|
||||
}
|
||||
#the-editor input[type=text]:focus,#the-editor input[type=number]:focus,#the-editor select:focus{
|
||||
box-shadow:rgba(185,159,101,.5) 0 0 4px 1px;
|
||||
background-color:#222;
|
||||
border-color:#b99f65
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* buttons */
|
||||
button{
|
||||
font-family:inherit;
|
||||
font-size:100%;
|
||||
min-width:120px;
|
||||
border-radius:2px;border:1px solid;border-color:#ccc #ccc #b3b3b3;
|
||||
|
||||
padding:6px 12px;
|
||||
margin:0 5px;
|
||||
|
||||
background-color:#f0f0f0;
|
||||
background-image:linear-gradient(to bottom, #fff, #e6e6e6);
|
||||
text-shadow:0 1px 0 #f8f8f8;
|
||||
color:#333;
|
||||
|
||||
box-shadow:0px 1px 0px rgba(255, 255, 255, 0.2) inset;
|
||||
transition:border-color ease-in-out .15s;
|
||||
|
||||
box-sizing:border-box;
|
||||
vertical-align:middle;
|
||||
}
|
||||
button.small{
|
||||
min-width:1px
|
||||
}
|
||||
button:hover{
|
||||
text-shadow:none;
|
||||
border-color:#999999
|
||||
}
|
||||
button:active,button.active{
|
||||
background-image:none;
|
||||
transform:translate(0px,1px);
|
||||
border-color:#888;
|
||||
text-shadow:none;
|
||||
|
||||
box-shadow:0 2px 8px -3px rgba(0, 0, 0, 0.5) inset;
|
||||
background-color:#eeeeee;
|
||||
transform:translateY(1px)
|
||||
}
|
||||
button:focus{}
|
||||
button:disabled{opacity:.35}
|
||||
|
||||
button.colored{color:white !important}
|
||||
button.colored.blue{
|
||||
box-shadow:0 1px 0 rgba(120, 200, 230, 0.5) inset;
|
||||
background-color:#21759B;
|
||||
background-image:linear-gradient(to bottom, #2A95C5, #21759B);
|
||||
border-color:#21759B #21759B #1E6A8D;
|
||||
text-shadow:0 -1px 0 #20749a
|
||||
}
|
||||
button.colored.blue:hover{
|
||||
box-shadow:0 1px 0 rgba(120, 200, 230, 0.6) inset;
|
||||
background-color:#278AB7;
|
||||
background-image:linear-gradient(to bottom, #2E9FD2, #21759B);
|
||||
border-color:#1B607F;
|
||||
text-shadow:0 -1px 0 #1b6080
|
||||
}
|
||||
button.colored.blue:active{
|
||||
box-shadow:0 2px 8px -3px rgba(0, 0, 0, 0.5) inset;
|
||||
background:linear-gradient(to bottom, #21759B, #278AB7) repeat scroll 0 0 #1B607F;
|
||||
border-color:#124560 #0e74a3 #0e74a3;
|
||||
text-shadow:0 -1px 0 #177ea4
|
||||
}
|
||||
|
||||
button.colored.red{
|
||||
box-shadow:0 1px 0 #df4c45 inset;
|
||||
background-color:#b72319;
|
||||
background-image:linear-gradient(to bottom, #ce271d, #a41f17);
|
||||
border-color:#a41f17 #a41f17 #951d15;
|
||||
text-shadow:0 -1px 0 #a01d15
|
||||
}
|
||||
button.colored.red:hover{
|
||||
box-shadow:0 1px 0 #e8564f inset !important;
|
||||
background-color:#bf261c !important;
|
||||
background-image:linear-gradient(to bottom, #db2c20, #a52017) !important;
|
||||
border-color:#871a13 !important;
|
||||
text-shadow:0 -1px 0 #8b1b14 !important
|
||||
}
|
||||
button.colored.red:active{
|
||||
box-shadow:0 2px 8px -3px rgba(0, 0, 0, 0.5) inset !important;
|
||||
background:linear-gradient(to bottom, #a51f17, #c1251b) repeat scroll 0 0 #b22118 !important;
|
||||
border-color:#66140c #a0150d #a0150d !important;
|
||||
text-shadow:0 -1px 0 #a41e17 !important
|
||||
}
|
||||
|
||||
button.colored.green{
|
||||
box-shadow:0 1px 0 #81cf81 inset !important;
|
||||
background-color:#59b259 !important;
|
||||
background-image:linear-gradient(to bottom, #61c261, #51a351) !important;
|
||||
border-color:#52a452 #4f9f4f #448944 !important;
|
||||
text-shadow:0 -1px 0 #37a137 !important
|
||||
}
|
||||
button.colored.green:hover{
|
||||
box-shadow:0 1px 0 #99de99 inset !important;
|
||||
background-color:#278AB7 !important;
|
||||
background-image:linear-gradient(to bottom, #64ce64, #51a351) !important;
|
||||
border-color:#3f7f3f !important;
|
||||
text-shadow:0 -1px 0 #1c9216 !important
|
||||
}
|
||||
button.colored.green:active{
|
||||
box-shadow:0 2px 8px -3px rgba(0, 0, 0, 0.5) inset !important;
|
||||
background:linear-gradient(to bottom, #1e8f22, #23a627) repeat scroll 0 0 #219b24 !important;
|
||||
border-color:#105815 #17941b #17941b !important;
|
||||
text-shadow:0 -1px 0 #17a417 !important
|
||||
}
|
||||
|
||||
button.colored.orange{
|
||||
box-shadow:0 1px 0 #ffb519 inset !important;
|
||||
background-color:#e69501 !important;
|
||||
background-image:linear-gradient(to bottom, #fda502, #d08400) !important;
|
||||
border-color:#d38500 #c97e00 #b46f00 !important;
|
||||
text-shadow:0 -1px 0 #8f5901 !important
|
||||
}
|
||||
button.colored.orange:hover{
|
||||
box-shadow:0 1px 0 #ffc03c inset !important;
|
||||
background-color:#e69501 !important;
|
||||
background-image:linear-gradient(to bottom, #ffb01e, #d08400) !important;
|
||||
border-color:#a36300 !important;
|
||||
text-shadow:0 -1px 0 #95620f !important
|
||||
}
|
||||
button.colored.orange:active{
|
||||
box-shadow:0 2px 8px -3px rgba(0, 0, 0, 0.5) inset !important;
|
||||
background:linear-gradient(to bottom, #c07400, #ed9500) repeat scroll 0 0 #219b24 !important;
|
||||
border-color:#53400b #886912 #886912 !important;
|
||||
text-shadow:0 -1px 0 #654e0e !important
|
||||
}
|
||||
|
||||
|
||||
button.transparent{
|
||||
min-width:auto;
|
||||
box-shadow:none;
|
||||
padding:0;
|
||||
background:none;
|
||||
text-decoration:underline;
|
||||
border:none;
|
||||
text-shadow:none;
|
||||
color:black !important
|
||||
}
|
||||
button.transparent:hover{background-color:rgba(0,0,0,.05)}
|
||||
button.no-text.with-icon:before{margin-right:0px}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.wrapper{
|
||||
max-width:920px;
|
||||
margin:0 auto
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* MarcDragAndDrop */
|
||||
#dragzone{
|
||||
border:4px dashed #b99f65;
|
||||
color:#b99f65;
|
||||
text-align:center;
|
||||
border-radius:8px;
|
||||
position:relative;
|
||||
transition:all .2s;
|
||||
padding-bottom:20px;
|
||||
/*font-weight:bold;*/
|
||||
}
|
||||
.dragging-files #dragzone{
|
||||
border-color:#3498db;
|
||||
color:#3498db;
|
||||
background-color:white
|
||||
}
|
||||
#dragzone-message{
|
||||
font-size:180%;
|
||||
margin:128px 0;
|
||||
line-height:2
|
||||
}
|
||||
#demo{
|
||||
text-decoration:none;
|
||||
padding:4px 16px;
|
||||
border-radius:3px;
|
||||
clear:both;
|
||||
position:relative;
|
||||
top:80px;
|
||||
}
|
||||
#demo:hover{
|
||||
background-color:#bbb;
|
||||
color:#000
|
||||
}
|
||||
|
||||
#warning{
|
||||
position:fixed;
|
||||
bottom:-80px;
|
||||
width:100%;
|
||||
background-color:#a30202;
|
||||
background-color:rgba(164,0,0,.96);
|
||||
color:white;
|
||||
transition:bottom .5s
|
||||
}
|
||||
#warning.visible{bottom:0px}
|
||||
#warning:hover{background-color:#b31212}
|
||||
#warning u{
|
||||
background-color:white;
|
||||
color:#b31212;
|
||||
text-decoration:none;
|
||||
padding:6px 16px;
|
||||
border-radius:3px;
|
||||
font-weight:bold
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* responsive */
|
||||
@media only screen and (max-width:961px){
|
||||
.wrapper{max-width:auto; padding-left:10px;padding-right:10px;}
|
||||
}
|
||||
@media only screen and (max-width:721px){
|
||||
#header .columns-6,#header .columns.six{width:100%;text-align:center}
|
||||
#the-editor{font-size:13px}
|
||||
}
|
||||
@media only screen and (max-width:481px){
|
||||
#the-editor{font-size:12px}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MarcDialogs */
|
||||
#dialog-about{background-color:#ffd823}
|
||||
|
||||
|
||||
|
||||
.dialog-overlay,.dialog{visibility:hidden;opacity:0}
|
||||
.dialog-overlay.active,.dialog.active{visibility:visible;opacity:1;transition-delay:0s}/* fixes fade-in/fade-out*/
|
||||
|
||||
.dialog-overlay{
|
||||
transition:visibility 0s .2s, opacity .2s;
|
||||
|
||||
background-color:black;
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";/* IE8 */
|
||||
background-color:rgba(255,255,255,.65)
|
||||
}
|
||||
|
||||
.dialog{
|
||||
position:absolute;top:0;left:0; /* fix for reserved space */
|
||||
|
||||
transform:translateY(-10px);
|
||||
transition:visibility 0s .2s, opacity .2s ease-in, transform .2s ease-in;
|
||||
|
||||
background-color:white;
|
||||
padding:15px;
|
||||
min-width:360px;
|
||||
max-width:80%;
|
||||
border-radius:4px;
|
||||
box-shadow:rgba(0,0,0,.5) 0 0 10px;
|
||||
line-height:1.8;
|
||||
color:#333;
|
||||
}
|
||||
.dialog.active{transform:translateY(0px)}
|
||||
|
||||
.buttons{
|
||||
margin-top:20px;
|
||||
text-align:center
|
||||
}
|
||||
|
||||
/* MarcTooltips */
|
||||
.tooltip{
|
||||
background-color:#eee;
|
||||
color:#333;
|
||||
padding:10px;
|
||||
visibility:hidden;
|
||||
opacity:0;
|
||||
z-index:8000;
|
||||
border-radius:2px;
|
||||
transition:visibility 0s .35s,opacity .35s;
|
||||
font-size:80%;
|
||||
}
|
||||
.tooltip.dark{
|
||||
background-color:#333;
|
||||
color:#eee
|
||||
}
|
||||
|
||||
/* separation */
|
||||
.tooltip.position-up{margin-bottom:8px}
|
||||
.tooltip.position-down{margin-top:8px}
|
||||
.tooltip.position-left{margin-right:8px}
|
||||
.tooltip.position-right{margin-left:8px}
|
||||
|
||||
/* animation */
|
||||
.tooltip.visible{visibility:visible;opacity:1;transition-delay:0s} /* transition-delay fixes fade-in/fade-out in some browsers */
|
||||
|
||||
.tooltip.align-right{
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
/* arrow */
|
||||
.tooltip:before{width:0;height:0;position:absolute;content:""}
|
||||
|
||||
.tooltip.position-down:before{top:-4px;border-bottom:5px solid #eee;border-left:5px solid transparent;border-right:5px solid transparent}
|
||||
.tooltip.position-up:before{bottom:-4px;border-top:5px solid #eee;border-left:5px solid transparent;border-right:5px solid transparent}
|
||||
.tooltip.position-left:before{right:-4px;border-left: 5px solid #eee;border-top:5px solid transparent;border-bottom: 5px solid transparent}
|
||||
.tooltip.position-right:before{left:-4px;border-right:5px solid #eee;border-top: 5px solid transparent;border-bottom: 5px solid transparent}
|
||||
|
||||
.tooltip.position-vertical.align-left:before{left:4px}
|
||||
.tooltip.position-vertical.align-center:before{left:50%;margin-left:-4px}
|
||||
.tooltip.position-vertical.align-right:before{right:4px}
|
||||
|
||||
.tooltip.position-horizontal.align-top:before{top:4px}
|
||||
.tooltip.position-horizontal.align-center:before{top:50%;margin-top:-4px}
|
||||
.tooltip.position-horizontal.align-bottom:before{bottom:4px}
|
||||
|
||||
.tooltip.dark.position-down:before{border-bottom:5px solid #333}
|
||||
.tooltip.dark.position-up:before{border-top:5px solid #333}
|
||||
.tooltip.dark.position-left:before{border-left: 5px solid #333}
|
||||
.tooltip.dark.position-right:before{border-right:5px solid #333}
|
||||
|
||||
|
||||
.tooltip.position-down:before{
|
||||
border-left:5px solid transparent;
|
||||
border-right:5px solid transparent;
|
||||
|
||||
border-bottom:5px solid #eee;
|
||||
top:-5px;
|
||||
}
|
||||
.tooltip.position-up:before{
|
||||
border-left:5px solid transparent;
|
||||
border-right:5px solid transparent;
|
||||
|
||||
border-top:5px solid #eee;
|
||||
bottom:-5px;
|
||||
}
|
||||
.tooltip.position-vertical.align-left .arrow{left:3px}
|
||||
.tooltip.position-vertical.align-center .arrow{left:50%;margin-left:-5px}
|
||||
.tooltip.position-vertical.align-right .arrow{right:3px}
|
||||
|
||||
.tooltip.position-left .arrow{
|
||||
border-top:5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
|
||||
border-left: 5px solid #eee;
|
||||
right:-5px;
|
||||
}
|
||||
.tooltip.position-right .arrow{
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
|
||||
border-right:5px solid #eee;
|
||||
left:-5px;
|
||||
}
|
||||
.tooltip.position-horizontal.align-top .arrow{top:3px}
|
||||
.tooltip.position-horizontal.align-center .arrow{top:50%;margin-top:-5px}
|
||||
.tooltip.position-horizontal.align-bottom .arrow{bottom:3px}
|
85
zelda-totk/zelda-totk.data.js
Normal file
1
zelda-totk/zelda-totk.hashes.csv
Normal file
@ -0,0 +1 @@
|
||||
2809733591;3;RupeesTest
|
|
158
zelda-totk/zelda-totk.icons.js
Normal file
@ -0,0 +1,158 @@
|
||||
/*
|
||||
The legend of Zelda: Tears of the Kingdom Savegame Editor (Icons) v20230505
|
||||
|
||||
by Marc Robledo 2023
|
||||
*/
|
||||
|
||||
var TOTK_Icons=(function(){
|
||||
var ICON_SIZE=64;
|
||||
var ICON_COLS=16;
|
||||
var IMG_PATH='./assets/';
|
||||
|
||||
var ICONS={
|
||||
Armor_Head:[],
|
||||
Armor_Upper:[],
|
||||
Armor_Lower:[],
|
||||
|
||||
Item_Chilled:[],
|
||||
Item_ChilledFish:[],
|
||||
Item_Enemy:[],
|
||||
Item_Material:[],
|
||||
Item_Meat:[],
|
||||
Item_Roast:[],
|
||||
Item_RoastFish:[],
|
||||
|
||||
Item_FishGet:[],
|
||||
Item_Fruit:[],
|
||||
Item_InsectGet:[],
|
||||
Item_MushroomGet:[],
|
||||
Item_Ore:[],
|
||||
Item_PlantGet:[],
|
||||
|
||||
Item_Cook:[],
|
||||
|
||||
Weapon_Sword:[],
|
||||
Weapon_Lsword:[],
|
||||
Weapon_Spear:[],
|
||||
Weapon_Bow:[],
|
||||
Weapon_Shield:[],
|
||||
|
||||
Other:[]
|
||||
}
|
||||
var REPEAT_ARMOR_ICONS_1=[];
|
||||
var REPEAT_ARMOR_ICONS_2=[];
|
||||
|
||||
var loadedImages={};
|
||||
var pendingImages=0;
|
||||
var isLoaded=false;
|
||||
|
||||
|
||||
var canvas=document.createElement('canvas');
|
||||
canvas.width=ICON_SIZE;
|
||||
canvas.height=ICON_SIZE;
|
||||
return{
|
||||
startLoadingIcons:function(){
|
||||
if(!pendingImages){
|
||||
isLoaded=true;
|
||||
TOTK_Icons.refreshAllIcons();
|
||||
}else if(!isLoaded){
|
||||
for(fileName in ICONS){
|
||||
loadedImages[fileName]=new Image();
|
||||
loadedImages[fileName].addEventListener('load', function(){
|
||||
pendingImages--;
|
||||
if(pendingImages===0){
|
||||
isLoaded=true;
|
||||
TOTK_Icons.refreshAllIcons();
|
||||
}
|
||||
}, false);
|
||||
loadedImages[fileName].src=IMG_PATH+fileName+'.png';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setIcon:function(el,itemNameId, dyeColor){
|
||||
if(isLoaded){
|
||||
if(dyeColor)
|
||||
el.src=this._getItemIcon(itemNameId, dyeColor);
|
||||
else
|
||||
el.src=this._getItemIcon(itemNameId);
|
||||
}else{
|
||||
el.nextSrc={id:itemNameId};
|
||||
}
|
||||
},
|
||||
|
||||
refreshIcon:function(el){
|
||||
},
|
||||
|
||||
refreshAllIcons:function(){
|
||||
var iconId=0;
|
||||
while(document.getElementById('icon'+iconId)){
|
||||
document.getElementById('icon'+iconId).src=this._getItemIcon(document.getElementById('icon'+iconId).nextSrc.id);
|
||||
iconId++;
|
||||
}
|
||||
},
|
||||
|
||||
_getItemIcon:function(itemNameId, clothesColor){
|
||||
var fileName,id,match;
|
||||
if(match=itemNameId.match(/^Armor_([0-9]{3})_(Head|Upper|Lower)(_Dye[0-9]{2})?/)){
|
||||
fileName='Armor_'+match[2];
|
||||
id=match[1];
|
||||
/* add dye */
|
||||
/*if(match[3])
|
||||
id+=match[3];*/
|
||||
|
||||
if(match[1]==='Lower' && id==='140'){
|
||||
id='141';
|
||||
}
|
||||
var index=REPEAT_ARMOR_ICONS_1.indexOf(id);
|
||||
if(index>=0){
|
||||
id=REPEAT_ARMOR_ICONS_2[parseInt(index/4)];
|
||||
}
|
||||
}else if(match=itemNameId.match(/^Item_(Chilled|ChilledFish|Enemy|Material|Meat|Roast|RoastFish)_([0-9]{2})/)){
|
||||
fileName='Item_'+match[1];
|
||||
id=match[2];
|
||||
}else if(itemNameId==='Item_Enemy_Put_57'){
|
||||
fileName='Item_Enemy';
|
||||
id='Put_57';
|
||||
}else if(match=itemNameId.replace('Animal_Insect_','Item_InsectGet_').replace('Mushroom_','MushroomGet_').replace('Plant_','PlantGet_').match(/^Item_(FishGet|Fruit|InsectGet|MushroomGet|Ore|PlantGet)_([A-Z][A-B]?)/)){
|
||||
fileName='Item_'+match[1];
|
||||
id=match[2];
|
||||
|
||||
/* fix normal (non-get) crabs */
|
||||
if((id==='K' || id==='O' || id==='Z') && itemNameId.startsWith('Animal_Insect_'))
|
||||
id='Normal'+id;
|
||||
}else if(match=itemNameId.match(/^Item_Cook_([A-P]_[0-9]{2})/)){
|
||||
fileName='Item_Cook';
|
||||
id=match[1];
|
||||
}else if(match=itemNameId.match(/^Weapon_(Sword|Lsword|Spear|Bow|Shield)_([0-9]{3})/)){
|
||||
fileName='Weapon_'+match[1];
|
||||
id=match[2];
|
||||
}else{
|
||||
fileName='Other';
|
||||
id=itemNameId;
|
||||
}
|
||||
|
||||
var icon=-1;
|
||||
if(fileName)
|
||||
icon=ICONS[fileName].indexOf(id);
|
||||
|
||||
if(icon===-1){
|
||||
return this.getBlankIcon()
|
||||
}
|
||||
|
||||
/* add dye */
|
||||
if(itemNameId.startsWith('Armor_') && clothesColor && clothesColor<=15){
|
||||
icon+=clothesColor;
|
||||
}
|
||||
|
||||
if(isLoaded){
|
||||
var img=loadedImages[fileName];
|
||||
canvas.getContext('2d').clearRect(0,0,canvas.width,canvas.height);
|
||||
canvas.getContext('2d').drawImage(img, (icon%ICON_COLS)*ICON_SIZE, parseInt(icon/ICON_COLS)*ICON_SIZE, ICON_SIZE, ICON_SIZE, 0, 0, ICON_SIZE, ICON_SIZE);
|
||||
return canvas.toDataURL();
|
||||
}
|
||||
},
|
||||
|
||||
getBlankIcon:function(){return './assets/_blank.png'},
|
||||
}
|
||||
}());
|
1015
zelda-totk/zelda-totk.js
Normal file
5
zelda-totk/zelda-totk.locations.js
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
The legend of Zelda: Tears of the Kingdom (Locations) v20230505
|
||||
*/
|
||||
|
||||
TOTK_Data.COORDS={};
|
297
zelda-totk/zelda-totk.master.js
Normal file
@ -0,0 +1,297 @@
|
||||
/*
|
||||
The legend of Zelda: Tears of the Kingdom - Master editor v20230505
|
||||
by Marc Robledo 2023
|
||||
*/
|
||||
|
||||
const BOOL=1;
|
||||
const BOOL_ARRAY=2;
|
||||
const S32=3;
|
||||
const S32_ARRAY=4;
|
||||
const F32=5;
|
||||
const F32_ARRAY=6;
|
||||
const VECTOR2F=7;
|
||||
const VECTOR2F_ARRAY=8;
|
||||
const VECTOR3F=9;
|
||||
const VECTOR3F_ARRAY=10;
|
||||
const VECTOR4F=11;
|
||||
const VECTOR4F_ARRAY=12;
|
||||
const STRING=13;
|
||||
const STRING_ARRAY=14;
|
||||
const STRING64=15;
|
||||
const STRING64_ARRAY=16;
|
||||
const STRING256=17;
|
||||
const STRING256_ARRAY=18;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function addEditorRow(container, left, right){
|
||||
var tr=document.createElement('tr');
|
||||
tr.appendChild(document.createElement('td'));
|
||||
tr.appendChild(document.createElement('td'));
|
||||
|
||||
tr.children[1].className='text-right';
|
||||
if(right){
|
||||
tr.children[0].appendChild(label(right.id, left));
|
||||
tr.children[1].appendChild(right);
|
||||
}else{
|
||||
tr.children[0].innerHTML=left;
|
||||
}
|
||||
container.appendChild(tr);
|
||||
}
|
||||
function createHashInput(container, hashId, type, offset){
|
||||
if(type===BOOL){
|
||||
var c=checkbox(hashId);
|
||||
c.offset=offset+4;
|
||||
c.addEventListener('change', setBoolean);
|
||||
if(tempFile.readU32(offset+4))
|
||||
c.checked=true;
|
||||
addEditorRow(container, hashId, c);
|
||||
return 8;
|
||||
}else if(type===S32){
|
||||
var inp=inputNumber(hashId, 0, 0xffffffff, tempFile.readU32(offset+4));
|
||||
inp.offset=offset+4;
|
||||
inp.addEventListener('change', setS32);
|
||||
addEditorRow(container, hashId, inp);
|
||||
return 8;
|
||||
}else if(type===F32){
|
||||
var inp=inputNumber(hashId, 0, 0xffffffff, tempFile.readF32(offset+4));
|
||||
inp.offset=offset+4;
|
||||
inp.addEventListener('change', setF32);
|
||||
addEditorRow(container, hashId, inp);
|
||||
return 8;
|
||||
}else if(type===VECTOR2F){
|
||||
createHashInput(container, hashId+'[x]', F32, offset);
|
||||
createHashInput(container, hashId+'[y]', F32, offset+8);
|
||||
return 16;
|
||||
}else if(type===VECTOR3F){
|
||||
createHashInput(container, hashId+'[x]', F32, offset);
|
||||
createHashInput(container, hashId+'[y]', F32, offset+8);
|
||||
createHashInput(container, hashId+'[z]', F32, offset+16);
|
||||
return 24;
|
||||
}else if(type===VECTOR4F){
|
||||
createHashInput(container, hashId+'[x]', F32, offset);
|
||||
createHashInput(container, hashId+'[y]', F32, offset+8);
|
||||
createHashInput(container, hashId+'[z]', F32, offset+16);
|
||||
createHashInput(container, hashId+'[t]', F32, offset+24);
|
||||
return 32;
|
||||
}else if(type===STRING){
|
||||
var inp=input(hashId, SavegameEditor._readString(offset+4));
|
||||
inp.offset=offset+4;
|
||||
inp.maxLength=32;
|
||||
inp.addEventListener('change', setString);
|
||||
addEditorRow(container, hashId, inp);
|
||||
return 0x20;
|
||||
}else if(type===STRING64){
|
||||
var inp=input(hashId, SavegameEditor._readString64(offset+4));
|
||||
inp.offset=offset+4;
|
||||
inp.maxLength=64;
|
||||
inp.addEventListener('change', setString64);
|
||||
addEditorRow(container, hashId, inp);
|
||||
return 0x80;
|
||||
}else if(type===STRING256){
|
||||
var inp=input(hashId, SavegameEditor._readString256(offset+4));
|
||||
inp.offset=offset+4;
|
||||
inp.maxLength=256;
|
||||
inp.addEventListener('change', setString256);
|
||||
addEditorRow(container, hashId, inp);
|
||||
return 0x0200;
|
||||
}else if(type && type%2===0){ /* array */
|
||||
var hash=tempFile.readU32(offset);
|
||||
var nextHash=hash;
|
||||
var i=0;
|
||||
var size=0;
|
||||
while(nextHash===hash){
|
||||
size=createHashInput(container, hashId+'['+i+']', type-1, offset+i*size);
|
||||
i++;
|
||||
nextHash=tempFile.readU32(offset+i*size);
|
||||
}
|
||||
}else{
|
||||
addEditorRow(container, hashId+' (unknown)');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function setBoolean(){
|
||||
SavegameEditor._writeBoolean(this.offset, this.checked, 0);
|
||||
}
|
||||
function setS32(){
|
||||
SavegameEditor._writeValue(this.offset, this.value, 0);
|
||||
}
|
||||
function setF32(){
|
||||
SavegameEditor._writeFloat32(this.offset, this.value, 0);
|
||||
}
|
||||
function setString(){
|
||||
SavegameEditor._writeString(this.offset, this.value);
|
||||
}
|
||||
function setString64(){
|
||||
SavegameEditor._writeString64(this.offset, this.value);
|
||||
}
|
||||
function setString256(){
|
||||
SavegameEditor._writeString256(this.offset, this.value);
|
||||
}
|
||||
|
||||
var TOTKMasterEditor=(function(){
|
||||
var HASHES_PER_PAGE=100;
|
||||
var loaded=false;
|
||||
|
||||
var HASHES=[];
|
||||
|
||||
var parseHashFile=function(responseText){
|
||||
var lines=responseText.split('\n');
|
||||
|
||||
for(var i=0; i<lines.length; i++){
|
||||
if(lines[i]){
|
||||
var data=lines[i].split(';');
|
||||
HASHES[parseInt(data[0])]=[
|
||||
parseInt(data[1]),
|
||||
data[2]
|
||||
];
|
||||
}
|
||||
}
|
||||
loaded=true;
|
||||
|
||||
document.getElementById('master-editor-loading').style.display='none';
|
||||
document.getElementById('master-editor-hidden').style.display='block';
|
||||
|
||||
TOTKMasterEditor.refreshResults();
|
||||
};
|
||||
|
||||
return{
|
||||
isLoaded:function(){
|
||||
return loaded;
|
||||
},
|
||||
loadHashes:function(){
|
||||
if(this.isLoaded()){
|
||||
this.refreshResults();
|
||||
}else if(typeof window.fetch==='function'){
|
||||
fetch('./zelda-totk.hashes.csv')
|
||||
.then(res => res.text()) // Gets the response and returns it as a blob
|
||||
.then(responseText => {
|
||||
parseHashFile(responseText);
|
||||
})
|
||||
.catch(function(){
|
||||
alert('Unexpected error: can\'t download hash file');
|
||||
});
|
||||
}else{
|
||||
var oReq=new XMLHttpRequest();
|
||||
oReq.open('GET', './zelda-totk.hashes.csv', true);
|
||||
oReq.responseType='text';
|
||||
|
||||
oReq.onload=function(oEvent){
|
||||
if(this.status===200) {
|
||||
parseHashFile(responseText);
|
||||
}else{
|
||||
alert('Unexpected error: can\'t download hash file');
|
||||
}
|
||||
};
|
||||
|
||||
oReq.onerror=function(oEvent){
|
||||
alert('Unexpected error: can\'t download hash file');
|
||||
};
|
||||
|
||||
oReq.send(null);
|
||||
}
|
||||
},
|
||||
|
||||
filterHashes:function(regexFilter){
|
||||
var findHashesIn;
|
||||
empty('table');
|
||||
this.filteredHashes=[];
|
||||
|
||||
if(regexFilter){
|
||||
findHashesIn={};
|
||||
for(var hash in HASHES){
|
||||
if(regexFilter.test(HASHES[hash][1])){
|
||||
findHashesIn[hash]=true;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
findHashesIn=HASHES;
|
||||
}
|
||||
|
||||
var previousHashValue=0;
|
||||
for(var i=0x28; i<tempFile.fileSize-4; i+=8){
|
||||
var hashValue=tempFile.readU32(i);
|
||||
|
||||
if(hashValue===previousHashValue)
|
||||
continue;
|
||||
previousHashValue=hashValue;
|
||||
|
||||
if(findHashesIn[hashValue]){
|
||||
this.filteredHashes.push({
|
||||
type:HASHES[hashValue][0],
|
||||
id:HASHES[hashValue][1],
|
||||
offset:i
|
||||
});
|
||||
}else if(regexFilter===-1){
|
||||
this.filteredHashes.push({
|
||||
id:'* '+this._toHexInt(hashValue)
|
||||
});
|
||||
}
|
||||
}
|
||||
this.filteredHashes.sort(function(a,b){
|
||||
if(a.id<b.id)return -1;
|
||||
if(a.id>b.id)return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
this.currentPage=0;
|
||||
this.nPages=parseInt(this.filteredHashes.length/HASHES_PER_PAGE);
|
||||
if(this.filteredHashes.length%HASHES_PER_PAGE!==0){
|
||||
this.nPages++;
|
||||
}
|
||||
|
||||
empty('select-page');
|
||||
for(var i=0; i<this.nPages; i++){
|
||||
var option=document.createElement('option');
|
||||
option.innerHTML=i+1;
|
||||
document.getElementById('select-page').appendChild(option);
|
||||
}
|
||||
this.setPage(0);
|
||||
|
||||
return this.filteredHashes;
|
||||
},
|
||||
|
||||
setPage:function(newPage){
|
||||
if(newPage>=0 && newPage<this.nPages){
|
||||
document.getElementById('select-page').selectedIndex=newPage;
|
||||
this.currentPage=newPage;
|
||||
|
||||
var filteredHashes=this.filteredHashes.slice(this.currentPage*HASHES_PER_PAGE, HASHES_PER_PAGE+this.currentPage*HASHES_PER_PAGE);
|
||||
empty('table');
|
||||
var container=document.createElement('tbody');
|
||||
for(var i=0; i<filteredHashes.length; i++){
|
||||
var hash=filteredHashes[i];
|
||||
|
||||
if(hash.type){
|
||||
createHashInput(container, hash.id, hash.type, hash.offset)
|
||||
}else{
|
||||
addEditorRow(container, hash.id);
|
||||
}
|
||||
}
|
||||
get('table').appendChild(container);
|
||||
}
|
||||
},
|
||||
prevPage:function(){this.setPage(this.currentPage-1);},
|
||||
nextPage:function(){this.setPage(this.currentPage+1);},
|
||||
|
||||
refreshResults:function(){
|
||||
var filter=getValue('filters').trim();
|
||||
var customFilter=getValue('custom-filter').trim();
|
||||
if(filter){
|
||||
this.filterHashes(new RegExp(filter));
|
||||
}else if(customFilter){
|
||||
this.filterHashes(new RegExp(customFilter, 'i'));
|
||||
}else{
|
||||
this.filterHashes(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|