diff --git a/Cargo.toml b/Cargo.toml index e3c5b04..378ebc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ meval = { git = "https://github.com/Titaniumtown/meval-rs.git" } eframe = { git = "https://github.com/Titaniumtown/egui", default-features = false, features = ["egui_glow"] } git-version = "0.3.5" include-flate = { git = "https://github.com/Titaniumtown/include-flate.git" } -web-sys = "0.3.56" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] instant = { version = "0.1.12" } diff --git a/src/lib.rs b/src/lib.rs index 4c2171c..185da05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,11 +37,6 @@ pub fn start(canvas_id: &str) -> Result<(), wasm_bindgen::JsValue> { // Used in order to hook into `panic!()` to log in the browser's console log_helper("Initializing panic hooks..."); std::panic::set_hook(Box::new(|panic_info| { - web_sys::window() - .and_then(|window| window.document()) - .and_then(|document| document.body()) - .and_then(|element| element.set_attribute("data-panicked", "true").ok()); - console_error_panic_hook::hook(panic_info); })); log_helper("Initialized panic hooks!"); diff --git a/www/index.html b/www/index.html index 32ec492..60bfafc 100644 --- a/www/index.html +++ b/www/index.html @@ -12,11 +12,6 @@ -
Loading… diff --git a/www/style.css b/www/style.css index 0718a87..ec19321 100644 --- a/www/style.css +++ b/www/style.css @@ -79,36 +79,3 @@ canvas { transform: rotate(360deg); } } - -body[data-panicked = true] { - background-color: #ce2828; - - #panic { - display: block; - } -} - -#panic { - display: none; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - - background-color: #ce2828; - color: #000; - - font-weight: bold; - text-align: center; - - padding: 1em 2em; - border-radius: 2em; - - pointer-events: none; - - h1 { - margin: 0; - } - - z-index: 1000000; -} \ No newline at end of file