Revert "Simplify copying of redirected links" - doesn't work with right click + open in new tab
This reverts commit 00da70626d
.
This commit is contained in:
parent
794ba74be4
commit
ba7af8e31c
|
@ -515,7 +515,7 @@ if (!$columns && support("table")) {
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<script type='text/javascript'>selectLinks(document.getElementById('table'));" . (!$group && $select ? "" : " tableCheck();") . "</script>\n";
|
echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($adminer->selectImportPrint()) {
|
if ($adminer->selectImportPrint()) {
|
||||||
|
|
|
@ -179,14 +179,6 @@ function tableClick(event, click) {
|
||||||
var el = getTarget(event);
|
var el = getTarget(event);
|
||||||
while (!isTag(el, 'tr')) {
|
while (!isTag(el, 'tr')) {
|
||||||
if (isTag(el, 'table|a|input|textarea')) {
|
if (isTag(el, 'table|a|input|textarea')) {
|
||||||
if (el.origHref) {
|
|
||||||
// open('about:blank').document.write('<meta http-equiv="Refresh">') still passes the referer in Chrome
|
|
||||||
var href = el.href;
|
|
||||||
el.href = el.origHref;
|
|
||||||
setTimeout(function () {
|
|
||||||
el.href = href;
|
|
||||||
}, 0);
|
|
||||||
}
|
|
||||||
if (el.type != 'checkbox') {
|
if (el.type != 'checkbox') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -203,21 +195,6 @@ function tableClick(event, click) {
|
||||||
trCheck(el);
|
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;
|
var lastChecked;
|
||||||
|
|
||||||
/** Shift-click on checkbox for multiple selection.
|
/** Shift-click on checkbox for multiple selection.
|
||||||
|
@ -684,7 +661,6 @@ function selectLoadMore(a, limit, loading) {
|
||||||
var tbody = document.createElement('tbody');
|
var tbody = document.createElement('tbody');
|
||||||
tbody.innerHTML = request.responseText;
|
tbody.innerHTML = request.responseText;
|
||||||
document.getElementById('table').appendChild(tbody);
|
document.getElementById('table').appendChild(tbody);
|
||||||
selectLinks(tbody);
|
|
||||||
if (tbody.children.length < limit) {
|
if (tbody.children.length < limit) {
|
||||||
a.parentNode.removeChild(a);
|
a.parentNode.removeChild(a);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -6,7 +6,6 @@ Display edit form after error in clone or multi-edit
|
||||||
Trim trailing non-breaking spaces in SQL textarea
|
Trim trailing non-breaking spaces in SQL textarea
|
||||||
Display time of the select command
|
Display time of the select command
|
||||||
Print elapsed time in HTML instead of SQL command comment
|
Print elapsed time in HTML instead of SQL command comment
|
||||||
Simplify copying of redirected links
|
|
||||||
Improve gzip export ratio (bug #387)
|
Improve gzip export ratio (bug #387)
|
||||||
Fix enum types in routines (bug #391)
|
Fix enum types in routines (bug #391)
|
||||||
MySQL: Fix editing rows by binary values, bug since Adminer 3.7.1
|
MySQL: Fix editing rows by binary values, bug since Adminer 3.7.1
|
||||||
|
|
Loading…
Reference in a new issue