summaryrefslogtreecommitdiff
path: root/pugl.js
diff options
context:
space:
mode:
Diffstat (limited to 'pugl.js')
-rw-r--r--pugl.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/pugl.js b/pugl.js
index 3c40494..7708b31 100644
--- a/pugl.js
+++ b/pugl.js
@@ -42,7 +42,6 @@ let next_widget_id = 1;
let widget_choices;
let widget_search;
let widgets_container;
-let code_input;
let error_element;
let parsed_widgets;
let paused = false;
@@ -2548,7 +2547,6 @@ function import_widgets(string) {
function export_widgets_to_local_storage() {
const widget_str = export_widgets();
- code_input.value = widget_str;
// re-read metadata so that having multiple tabs with pugl open isn't an issue
const new_metadata = JSON.parse(localStorage.getItem(`${APP_ID}-metadata`));
creation_metadata = new_metadata || {};
@@ -2688,7 +2686,6 @@ function startup() {
widget_choices = document.getElementById('widget-choices');
widget_search = document.getElementById('widget-search');
widgets_container = document.getElementById('widgets-container');
- code_input = document.getElementById('code');
error_element = document.getElementById('error');
creation_title_element = document.getElementById('creation-title');
auto_update_element = document.getElementById('auto-update');
@@ -2777,7 +2774,7 @@ function startup() {
document.getElementById('link-creation').addEventListener('click', () => {
// copy link
- const string = code_input.value;
+ const string = export_widgets();
const url = new URL(location.href);
url.search = '';
url.hash = '';
@@ -2798,10 +2795,6 @@ function startup() {
set_up_framebuffer();
});
- document.getElementById('code-form').addEventListener('submit', () => {
- new_creation(code_input.value);
- });
-
pause_element = document.getElementById('pause');
play_element = document.getElementById('play');
step_element = document.getElementById('step');