+++ /dev/null
-// ==UserScript==
-// @name HIValign: automatic e-mail address
-// @namespace http://dariusz.murakowski.org
-// @version 0.1
-// @description also focuses on "(optional) title" input field
-// @author Dariusz Murakowski
-// @copyright 2018+, Dariusz Murakowski
-// @license AGPL-3.0-or-later
-// @match https://www.hiv.lanl.gov/cgi-bin/VIRALIGN/viralign.cgi
-// @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 == 'HIValign') {
- var address = 'murakdar@mit.edu';
- get0('input[name=EMAIL]').value = address;
- get0('input[name=EMAIL2]').value = address;
- get0('input[name=titleFromUser]').focus();
- }
-})();
--- /dev/null
+// ==UserScript==
+// @name LANL HIV results page: set alt+S keyboard shortcut to improve download options
+// @namespace http://dariusz.murakowski.org
+// @version 0.2
+// @description add alt+S shortcut to include HXB2 seq and label with accession code and patient ID
+// @author Dariusz Murakowski
+// @copyright 2018+, Dariusz Murakowski
+// @license AGPL-3.0-or-later
+// @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;
+ }
+ }
+
+ function doStuff() {
+ // onclick="showElt('both'); hideElt('tree'); hideElt('down'); showElt('save')"
+ get0('input[value="Download Sequences"]').click();
+
+ // simulate clicking the "compose a label" link
+ Changesaveoutput();showElt('compose');
+
+ // set options
+ get0('input[name=INCLUDE_HXB2]').checked = true;
+ get0('input[name=comp_sa_genbankaccession]').value = 5;
+ get0('input[name=comp_ssam_pat_id]').value = 6;
+ }
+
+ // https://superuser.com/questions/496212/shortcut-to-open-specific-bookmark-url-in-chrome/1313997#1313997
+ document.addEventListener('keyup', function(event) {
+ if (!event.ctrlKey && event.altKey && !event.shiftKey) {
+ if ('S' == String.fromCharCode(event.keyCode)) {
+ doStuff();
+ }
+ }
+ });
+})();
--- /dev/null
+// ==UserScript==
+// @name LANL HIV search: set e-mail field
+// @namespace http://dariusz.murakowski.org
+// @version 0.2
+// @description only sets e-mail field when title matches "Mail-back submission form "
+// @author Dariusz Murakowski
+// @copyright 2018+, Dariusz Murakowski
+// @license AGPL-3.0-or-later
+// @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 = 'you@EDIT_ME_BEFORE_USE@example.com';
+ get0('input[name=job_title]').focus();
+ }
+})();
--- /dev/null
+// ==UserScript==
+// @name LANL HIV sequence search: nicer formatting
+// @namespace http://dariusz.murakowski.org
+// @version 0.2
+// @description expand size of "subtype" box; add B and C keyboard shortcuts to select those clades
+// @author Dariusz Murakowski
+// @copyright 2018+, Dariusz Murakowski
+// @license AGPL-3.0-or-later
+// @match https://www.hiv.lanl.gov/components/sequence/HIV/search/search.html
+// @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;
+ }
+ }
+
+ var subtype_box = get0('select.si_pulldown[name=slave]');
+ subtype_box.setAttribute("size","10"); // default size=6
+
+ // https://superuser.com/questions/496212/shortcut-to-open-specific-bookmark-url-in-chrome/1313997#1313997
+ var kb = {}, option;
+ kb['B'] = "B* or Bstar";
+ kb['C'] = "C* or Cstar";
+ document.addEventListener('keyup', function(event) {
+ if (!event.ctrlKey && !event.altKey && event.shiftKey) {
+ if (option = kb[String.fromCharCode(event.keyCode)]) {
+ console.log(subtype_box);
+ subtype_box.value = option;
+ }
+ }
+ });
+
+ var region_box = get0('select.si_pulldown[name="Genomic Region"]');
+ region_box.setAttribute("size","10"); // default size=7
+
+ // click the "More sequence information" button
+// var more = document.getElementById('extra_sequence_information_img');
+// console.log(more);
+// more.click();
+})();
--- /dev/null
+// ==UserScript==
+// @name LANL HIValign: automatic e-mail address
+// @namespace http://dariusz.murakowski.org
+// @version 0.2
+// @description also focuses on "(optional) title" input field
+// @author Dariusz Murakowski
+// @copyright 2018+, Dariusz Murakowski
+// @license AGPL-3.0-or-later
+// @match https://www.hiv.lanl.gov/cgi-bin/VIRALIGN/viralign.cgi
+// @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 == 'HIValign') {
+ var address = 'you@EDIT_ME_BEFORE_USE@example.com';
+ get0('input[name=EMAIL]').value = address;
+ get0('input[name=EMAIL2]').value = address;
+ get0('input[name=titleFromUser]').focus();
+ }
+})();
+++ /dev/null
-// ==UserScript==
-// @name nicer formatting for HIV LANL sequence search
-// @namespace http://dariusz.murakowski.org
-// @version 0.1
-// @description expand size of "subtype" box
-// @author Dariusz Murakowski
-// @copyright 2018+, Dariusz Murakowski
-// @license AGPL-3.0-or-later
-// @match https://www.hiv.lanl.gov/components/sequence/HIV/search/search.html
-// @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;
- }
- }
-
- var subtype_box = get0('select.si_pulldown[name=slave]');
- subtype_box.setAttribute("size","10"); // default size=6
-
- // https://superuser.com/questions/496212/shortcut-to-open-specific-bookmark-url-in-chrome/1313997#1313997
- var kb = {}, option;
- kb['B'] = "B* or Bstar";
- kb['C'] = "C* or Cstar";
- document.addEventListener('keyup', function(event) {
- if (!event.ctrlKey && !event.altKey && event.shiftKey) {
- if (option = kb[String.fromCharCode(event.keyCode)]) {
- console.log(subtype_box);
- subtype_box.value = option;
- }
- }
- });
-
- var region_box = get0('select.si_pulldown[name="Genomic Region"]');
- region_box.setAttribute("size","10"); // default size=7
-
- // click the "More sequence information" button
-// var more = document.getElementById('extra_sequence_information_img');
-// console.log(more);
-// more.click();
-})();
+++ /dev/null
-// ==UserScript==
-// @name set alt+S keyboard shortcut on HIV LANL results page to improve download options
-// @namespace http://dariusz.murakowski.org
-// @version 0.1
-// @description add alt+S shortcut to include HXB2 seq and label with accession code and patient ID
-// @author Dariusz Murakowski
-// @copyright 2018+, Dariusz Murakowski
-// @license AGPL-3.0-or-later
-// @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;
- }
- }
-
- function doStuff() {
- // onclick="showElt('both'); hideElt('tree'); hideElt('down'); showElt('save')"
- get0('input[value="Download Sequences"]').click();
-
- // simulate clicking the "compose a label" link
- Changesaveoutput();showElt('compose');
-
- // set options
- get0('input[name=INCLUDE_HXB2]').checked = true;
- get0('input[name=comp_sa_genbankaccession]').value = 5;
- get0('input[name=comp_ssam_pat_id]').value = 6;
- }
-
- // https://superuser.com/questions/496212/shortcut-to-open-specific-bookmark-url-in-chrome/1313997#1313997
- document.addEventListener('keyup', function(event) {
- if (!event.ctrlKey && event.altKey && !event.shiftKey) {
- if ('S' == String.fromCharCode(event.keyCode)) {
- doStuff();
- }
- }
- });
-})();
+++ /dev/null
-// ==UserScript==
-// @name set e-mail field to HIVfasta@mailinator.com
-// @namespace http://dariusz.murakowski.org
-// @version 0.1
-// @description only sets e-mail field when title matches "Mail-back submission form "
-// @author Dariusz Murakowski
-// @copyright 2018+, Dariusz Murakowski
-// @license AGPL-3.0-or-later
-// @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();
- }
-})();