[rs-commit] r18 - in /rst-interop/trunk/src/site: resources/crypto.signText/signtext-form.js xhtml5/crypto.signText/index.xhtml5

rs-commit at redwax.eu rs-commit at redwax.eu
Sun Sep 19 14:44:45 CEST 2021


Author: minfrin at redwax.eu
Date: Sun Sep 19 14:44:45 2021
New Revision: 18

Log:
Add javascript code for detection.

Modified:
    rst-interop/trunk/src/site/resources/crypto.signText/signtext-form.js
    rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5

Modified: rst-interop/trunk/src/site/resources/crypto.signText/signtext-form.js
==============================================================================
--- rst-interop/trunk/src/site/resources/crypto.signText/signtext-form.js	(original)
+++ rst-interop/trunk/src/site/resources/crypto.signText/signtext-form.js	Sun Sep 19 14:44:45 2021
@@ -12,7 +12,7 @@
 
 function detectRequest(form) {
   if (crypto.signText) {
-    crypto.signText().then(response => { form['detected'].value = response });
+    crypto.signText().then(response => form['detected'].value = response.name + ' v' + response.version; });
   }
   else {
     alert('An implementation of crypto.signText() is not installed in this browser.');

Modified: rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5
==============================================================================
--- rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5	(original)
+++ rst-interop/trunk/src/site/xhtml5/crypto.signText/index.xhtml5	Sun Sep 19 14:44:45 2021
@@ -137,6 +137,15 @@
   }
 }
 
+function detectRequest(form) {
+  if (crypto.signText) {
+    crypto.signText().then(response => form['detected'].value = response.name + ' v' + response.version; });
+  }
+  else {
+    alert('An implementation of crypto.signText() is not installed in this browser.');
+  }
+}
+
 function signLegacyRequest(form) {
   if (crypto.signText) {
     form['legacysigned'].value = crypto.signText(form['tobelegacysigned'].value, 'ask');



More information about the rs-commit mailing list