1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-07-17 16:38:31 +00:00

Remove inline CSS and inline JS

Gets rid of the inline CSS and inline JS. Allows for a stricter CSP implementation.
This commit is contained in:
GhostlyDark 2020-11-07 19:06:16 +01:00
parent 583615d2be
commit 71ab04c1f0
3 changed files with 19 additions and 6 deletions

View file

@ -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)})
})