From f9922ae0f9b05afb3f485a60f57744f61fda8c40 Mon Sep 17 00:00:00 2001 From: Paweł Zuzelski Date: Tue, 8 Jun 2010 16:31:50 +0200 Subject: Resurect go_input script. --- examples/data/scripts/go_input.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/data/scripts/go_input.js (limited to 'examples/data/scripts/go_input.js') diff --git a/examples/data/scripts/go_input.js b/examples/data/scripts/go_input.js new file mode 100644 index 0000000..557671f --- /dev/null +++ b/examples/data/scripts/go_input.js @@ -0,0 +1,27 @@ +var elements = document.querySelectorAll("textarea, input" + [ + ":not([type='button'])", + ":not([type='checkbox'])", + ":not([type='hidden'])", + ":not([type='image'])", + ":not([type='radio'])", + ":not([type='reset'])", + ":not([type='submit'])"].join("")); +function gi() { + if (elements) { + var el, i = 0; + while((el = elements[i++])) { + var style=getComputedStyle(el, null); + if (style.display !== 'none' && style.visibility === 'visible') { + if (el.type === "file") { + el.click(); + } + else { + el.focus(); + } + return "XXXEMIT_FORM_ACTIVEXXX"; + } + } + } +} + +gi(); -- cgit v1.2.3