From b342b2a4c70e4771845a68426ac15639ca74292e Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20SAUVAGE?= Date: Wed, 27 Feb 2013 18:24:07 +0100 Subject: [PATCH] After clicking save/cancel on a link, scroll to the link itself. --- index.php | 2 ++ tpl/linklist.html | 1 + 2 files changed, 3 insertions(+) diff --git a/index.php b/index.php index 0590b2f6..1ac5187b 100644 --- a/index.php +++ b/index.php @@ -1437,6 +1437,7 @@ function renderPage() // If we are called from the bookmarklet, we must close the popup: if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo ''; exit; } $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); + $returnurl .= '#'.smallHash($linkdate); // Scroll to the link which has been edited. header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on. exit; } @@ -1447,6 +1448,7 @@ function renderPage() // If we are called from the bookmarklet, we must close the popup; if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo ''; exit; } $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); + $returnurl .= '#'.smallHash($_POST['lf_linkdate']); // Scroll to the link which has been edited. header('Location: '.$returnurl); // After canceling, redirect to the page the user was on. exit; } diff --git a/tpl/linklist.html b/tpl/linklist.html index 267e13bc..45bd478f 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html @@ -30,6 +30,7 @@