Skip to content

Commit 98ee9cc

Browse files
authored
Update generate_buttons.js (#2166)
1 parent 40c2df9 commit 98ee9cc

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

static/js/generate_buttons.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,9 @@ async function generate_seed_from_patch(event) {
8383
patchElement.classList.add("is-invalid");
8484
}
8585
} else {
86-
// Apply the conversion
87-
window.apply_conversion();
88-
await setup_pyodide();
89-
await pyodide.runPythonAsync(`from pyodide_importer import register_hook # type: ignore # noqa
90-
try:
91-
register_hook("/") # type: ignore # noqa
92-
except Exception:
93-
pass
94-
import js
95-
from randomizer.Patching.ApplyLocal import patching_response
96-
await patching_response(str(js.get_previous_seed_data()), True, js.loaded_patch, True)`)
97-
98-
}
86+
// Apply the patch
87+
await apply_patch(loaded_patch, true)
88+
}
9989
}
10090
}
10191

0 commit comments

Comments
 (0)