LibWeb: Remove duplicated locals in EventHandler::handle_mousedown()

This commit is contained in:
Andreas Kling 2021-02-09 20:49:01 +01:00
parent da7a8fc055
commit 2c4829cb14
Notes: sideshowbarker 2024-07-18 22:28:12 +09:00

View file

@ -174,8 +174,6 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
auto url = document->complete_url(href);
dbgln("Web::EventHandler: Clicking on a link to {}", url);
if (button == GUI::MouseButton::Left) {
auto href = link->href();
auto url = document->complete_url(href);
if (href.starts_with("javascript:")) {
document->run_javascript(href.substring_view(11, href.length() - 11));
} else if (href.starts_with('#')) {