From 0310afbb044619c2166b1667c0fde12948a238cf Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 6 Sep 2023 22:42:48 -0400 Subject: remove code input since it's not really needed anymore --- pugl.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'pugl.js') 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'); -- cgit v1.2.3