1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 20:31:19 +02:00

Use isTag() JS function

This commit is contained in:
Jakub Vrana
2013-07-12 14:06:44 -07:00
parent be6b7c6cac
commit 9b32d638bb
2 changed files with 22 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ function selectFieldChange(form) {
function whisperClick(event, field) {
var el = event.target || event.srcElement;
if (/^a$/i.test(el.tagName) && !(event.button || event.shiftKey || event.altKey || isCtrl(event))) {
if (isTag(el, 'a') && !(event.button || event.shiftKey || event.altKey || isCtrl(event))) {
field.value = el.firstChild.data;
field.previousSibling.value = decodeURIComponent(el.href.replace(/.*=/, ''));
field.nextSibling.style.display = 'none';