]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.help: onload javascript to check radio
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Feb 2022 23:38:23 +0000 (15:38 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Feb 2022 23:38:23 +0000 (15:38 -0800)
extra/webapps/help/search.js [new file with mode: 0644]
extra/webapps/help/search.xml

diff --git a/extra/webapps/help/search.js b/extra/webapps/help/search.js
new file mode 100644 (file)
index 0000000..674a7bc
--- /dev/null
@@ -0,0 +1,6 @@
+window.onload = function() {
+    var radios = document.getElementsByClassName("radiotab");
+    if (radios.length > 0) {
+        radios[0].checked = true;
+    }
+}
index 31de1f5d457e1b4120e9dabeb50c2a9644a8bf69..b64b49ecbda22c0485b5b48a88ef2384717e7be8 100644 (file)
@@ -4,6 +4,7 @@
 
     <t:title>Search - Factor Documentation</t:title>
     <t:style t:include="resource:extra/webapps/help/search.css" />
+    <t:script t:include="resource:extra/webapps/help/search.js" />
 
     <t:html t:name="navbar"/>