From ba7af8e31c90dd8148cbb90c91b16acf9e69d2d5 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 26 Mar 2014 08:38:23 -0700 Subject: [PATCH] Revert "Simplify copying of redirected links" - doesn't work with right click + open in new tab This reverts commit 00da70626d0d09a3f5871db3cfb3d6ae8daea799. --- adminer/select.inc.php | 2 +- adminer/static/functions.js | 24 ------------------------ changes.txt | 1 - 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index b7ce53f6..3e70feb6 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -515,7 +515,7 @@ if (!$columns && support("table")) { echo "\n"; } - echo "\n"; + echo (!$group && $select ? "" : "\n"); } if ($adminer->selectImportPrint()) { diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 27836512..c18fe9bc 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -179,14 +179,6 @@ function tableClick(event, click) { var el = getTarget(event); while (!isTag(el, 'tr')) { if (isTag(el, 'table|a|input|textarea')) { - if (el.origHref) { - // open('about:blank').document.write('') still passes the referer in Chrome - var href = el.href; - el.href = el.origHref; - setTimeout(function () { - el.href = href; - }, 0); - } if (el.type != 'checkbox') { return; } @@ -203,21 +195,6 @@ function tableClick(event, click) { trCheck(el); } -/** Clean redirect links to simplify their copying -* @param HTMLElement -*/ -function selectLinks(table) { - var as = table.getElementsByTagName('a'); - for (var i = 0; i < as.length; i++) { - var a = as[i]; - var match = /^https?:\/\/www\.adminer\.org\/redirect\/\?url=(.+)/.exec(a.href); //! rewrites also links intentionally stored with http://www.adminer.org/redirect/?url= - if (match) { - a.origHref = a.href; - a.href = decodeURIComponent(match[1]); - } - } -} - var lastChecked; /** Shift-click on checkbox for multiple selection. @@ -684,7 +661,6 @@ function selectLoadMore(a, limit, loading) { var tbody = document.createElement('tbody'); tbody.innerHTML = request.responseText; document.getElementById('table').appendChild(tbody); - selectLinks(tbody); if (tbody.children.length < limit) { a.parentNode.removeChild(a); } else { diff --git a/changes.txt b/changes.txt index 43e9b134..b2a4c78e 100644 --- a/changes.txt +++ b/changes.txt @@ -6,7 +6,6 @@ Display edit form after error in clone or multi-edit Trim trailing non-breaking spaces in SQL textarea Display time of the select command Print elapsed time in HTML instead of SQL command comment -Simplify copying of redirected links Improve gzip export ratio (bug #387) Fix enum types in routines (bug #391) MySQL: Fix editing rows by binary values, bug since Adminer 3.7.1