mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
Merge pull request #19 from GhostlyDark/master
Remove inline CSS and inline JS
This commit is contained in:
commit
ef28a16c3c
3 changed files with 19 additions and 6 deletions
12
index.html
12
index.html
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
<!-- APP -->
|
<!-- APP -->
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<div id="switch-container"><span id="switch-create-button" onclick="setCreatorMode(!/enabled/.test(el('switch-create').className));"><span data-localize="creator_mode">Creator mode</span> <span id="switch-create" class="switch disabled"></span></span></div>
|
<div id="switch-container"><span id="switch-create-button"><span data-localize="creator_mode">Creator mode</span> <span id="switch-create" class="switch disabled"></span></span></div>
|
||||||
|
|
||||||
<div id="tab0" class="tab">
|
<div id="tab0" class="tab">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -113,13 +113,13 @@
|
||||||
<div class="leftcol">MD5:</div><div class="rightcol"><span id="md5"></span></div>
|
<div class="leftcol">MD5:</div><div class="rightcol"><span id="md5"></span></div>
|
||||||
<div class="leftcol">SHA-1:</div><div class="rightcol"><span id="sha1"></span></div>
|
<div class="leftcol">SHA-1:</div><div class="rightcol"><span id="sha1"></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="row-removeheader" style="display:none">
|
<div class="row" id="row-removeheader">
|
||||||
<div class="leftcol"></div>
|
<div class="leftcol"></div>
|
||||||
<div class="rightcol">
|
<div class="rightcol">
|
||||||
<input type="checkbox" id="checkbox-removeheader" /> <label for="checkbox-removeheader" data-localize="remove_header">Remove header before patching</label>
|
<input type="checkbox" id="checkbox-removeheader" /> <label for="checkbox-removeheader" data-localize="remove_header">Remove header before patching</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="row-addheader" style="display:none">
|
<div class="row" id="row-addheader">
|
||||||
<div class="leftcol"></div>
|
<div class="leftcol"></div>
|
||||||
<div class="rightcol">
|
<div class="rightcol">
|
||||||
<input type="checkbox" id="checkbox-addheader" /> <label for="checkbox-addheader" data-localize="add_header">Add temporary header</label> <small>(<label id="headersize" for="checkbox-addheader"></label>)</small>
|
<input type="checkbox" id="checkbox-addheader" /> <label for="checkbox-addheader" data-localize="add_header">Add temporary header</label> <small>(<label id="headersize" for="checkbox-addheader"></label>)</small>
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<span id="message-apply" class="message"></span>
|
<span id="message-apply" class="message"></span>
|
||||||
<button id="button-apply" data-localize="apply_patch" class="disabled" disabled onclick="applyPatch(patch, romFile, false)">Apply patch</button>
|
<button id="button-apply" data-localize="apply_patch" class="disabled" disabled>Apply patch</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<span id="message-create" class="message"></span>
|
<span id="message-create" class="message"></span>
|
||||||
<button id="button-create" class="disabled" disabled onclick="createPatch(romFile1, romFile2, el('select-patch-type').value)" data-localize="create_patch">Create patch</button>
|
<button id="button-create" class="disabled" disabled data-localize="create_patch">Create patch</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
<!-- FOOTER -->
|
<!-- FOOTER -->
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<select id="select-language" onchange="setLanguage(this.value)">
|
<select id="select-language">
|
||||||
<option value="en">English</option>
|
<option value="en">English</option>
|
||||||
<option value="de">Deutsch</option>
|
<option value="de">Deutsch</option>
|
||||||
<option value="es">Español</option>
|
<option value="es">Español</option>
|
||||||
|
|
|
@ -674,6 +674,14 @@ function setCreatorMode(creatorMode){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Event listeners */
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
document.getElementById("switch-create-button").addEventListener('click', function(){setCreatorMode(!/enabled/.test(el('switch-create').className))})
|
||||||
|
document.getElementById("button-apply").addEventListener('click', function(){applyPatch(patch, romFile, false)})
|
||||||
|
document.getElementById("button-create").addEventListener('click', function(){createPatch(romFile1, romFile2, el('select-patch-type').value)})
|
||||||
|
document.getElementById("select-language").addEventListener('change', function(){setLanguage(this.value)})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,11 @@ body{
|
||||||
user-select:none
|
user-select:none
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* hide header checkboxes */
|
||||||
|
#row-removeheader,#row-addheader{display:none}
|
||||||
|
|
||||||
|
|
||||||
/* flex main column */
|
/* flex main column */
|
||||||
html, body{height:100%}
|
html, body{height:100%}
|
||||||
#column{
|
#column{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue