1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

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

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('#')) {