save all
This commit is contained in:
+47
-7
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en-US,zh-CN">
|
||||
<head>
|
||||
<meta charset="US-ASCII">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>ASN.1 JavaScript decoder</title>
|
||||
<link rel="stylesheet" href="index.css" type="text/css">
|
||||
@@ -15,12 +15,12 @@
|
||||
<form>
|
||||
<textarea id="area" style="width: 100%;" rows="8"></textarea>
|
||||
<br>
|
||||
<label title="can be slow with big files"><input type="checkbox" id="wantHex" checked="checked"> with hex dump</label>
|
||||
<input id="butDecode" type="button" value="decode">
|
||||
<input id="butClear" type="button" value="clear">
|
||||
<label title="can be slow with big files"><input type="checkbox" id="wantHex" checked="checked">显示 HEX DUMP</label>
|
||||
<input id="butDecode" type="button" value="解码">
|
||||
<input id="butClear" type="button" value="清空">
|
||||
<input type="file" id="file">
|
||||
<div>
|
||||
Examples:
|
||||
示例:
|
||||
<select id="examples">
|
||||
<option value="sig-p256-der.p7m">PKCS#7/CMS attached signature (DER)</option>
|
||||
<option value="sig-p256-ber.p7m">PKCS#7/CMS attached signature (BER)</option>
|
||||
@@ -28,7 +28,7 @@
|
||||
<option value="letsencrypt-x3.cer">X.509 certificate: Let's Encrypt X3</option>
|
||||
<option value="ed25519.cer">X.509 certificate: ed25519 (RFC 8410)</option>
|
||||
</select>
|
||||
<input id="butExample" type="button" value="load example">
|
||||
<input id="butExample" type="button" value="载入示例">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -39,5 +39,45 @@
|
||||
<script type="text/javascript" src="asn1.js"></script>
|
||||
<script type="text/javascript" src="dom.js"></script>
|
||||
<script type="text/javascript" src="index.js"></script>
|
||||
<script type="application/javascript" src="./jquery-1.8.0.min.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
$(function (){
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
if (event.ctrlKey && event.which == 67) {
|
||||
console.log("Ctrl + C 被按下");
|
||||
event.preventDefault(); // 阻止默认的复制操作
|
||||
// 寻找激活的 node
|
||||
$(".node:hover").each(function() {
|
||||
var $this = $(this)
|
||||
if ( $this.hasClass("node") && $this.hasClass("collapsed") ) {
|
||||
console.log("当前 hover 的标签:", this);
|
||||
let $b = $this.find("b")[0]
|
||||
if ( $b ) {
|
||||
var v = $($b).text()
|
||||
console.log("v=" , v)
|
||||
navigator.clipboard.writeText(v)
|
||||
.then(function() {
|
||||
console.log('内容已复制到剪贴板');
|
||||
// 可选:清除输入框内容
|
||||
tempInput.remove();
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.error('无法写入剪贴板:', err);
|
||||
// 可选:清除输入框内容
|
||||
tempInput.remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Vendored
+2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user