From 7346eb23ec5b2a3b21e91463ffdc2d4d265cc965 Mon Sep 17 00:00:00 2001 From: ozh Date: Fri, 24 Oct 2014 17:11:59 +0200 Subject: [PATCH] Don't prefill empty input field. Fixes #1716. No need to use a jQuery fallback, by the way. --- includes/functions-html.php | 3 +-- js/insert.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/functions-html.php b/includes/functions-html.php index 18ced9e..176829a 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -166,12 +166,11 @@ function yourls_html_footer() { * @param string $keyword Keyword to prefill the input with */ function yourls_html_addnew( $url = '', $keyword = '' ) { - $url = $url ? $url : 'http://'; ?>
-
: +
: : :
diff --git a/js/insert.js b/js/insert.js index 3715ab3..cf5403e 100644 --- a/js/insert.js +++ b/js/insert.js @@ -176,7 +176,7 @@ function zebra_table() { // Ready to add another URL function add_link_reset() { - $('#add-url').val('http://').focus(); + $('#add-url').val('').focus(); $('#add-keyword').val(''); } -- 2.45.0