From a0d52106b14d2784e577037387a5049ed4068eac Mon Sep 17 00:00:00 2001 From: Dariusz Murakowski Date: Wed, 25 Apr 2018 16:16:16 -0400 Subject: [PATCH] LANL: set e-mail field, focus on job title --- ...e-mail field to HIVfasta@mailinator.com.user.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 set e-mail field to HIVfasta@mailinator.com.user.js diff --git a/set e-mail field to HIVfasta@mailinator.com.user.js b/set e-mail field to HIVfasta@mailinator.com.user.js new file mode 100644 index 0000000..13555e4 --- /dev/null +++ b/set e-mail field to HIVfasta@mailinator.com.user.js @@ -0,0 +1,28 @@ +// ==UserScript== +// @name set e-mail field to HIVfasta@mailinator.com +// @namespace http://tampermonkey.net/ +// @version 0.1 +// @description only sets e-mail field when title matches "Mail-back submission form " +// @author You +// @match https://www.hiv.lanl.gov/components/sequence/HIV/search/search.comp +// @grant none +// @run-at document-end +// ==/UserScript== + +(function() { + 'use strict'; + + function get0(s) { + var sel = document.querySelectorAll(s); + if (sel.length == 1) { + var out = sel[0]; + console.log(out); + return out; + } + } + + if (document.title.startsWith('Mail-back submission form ')) { + get0('input[name=email]').value = 'HIVfasta@mailinator.com'; + get0('input[name=job_title]').focus(); + } +})(); \ No newline at end of file -- 2.7.4