Skip to content

Commit

Permalink
feat(Copied): using replication in non-https environments (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: gaopw5 <gaopw5@chinaunicom.cn> 8375038
  • Loading branch information
jaywcjlove committed Aug 6, 2024
1 parent 7da0dc7 commit dee90f1
Show file tree
Hide file tree
Showing 93 changed files with 262 additions and 174 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTORS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"files": {
"main.css": "/static/css/main.0da2652e.css",
"main.js": "/static/js/main.d0cfd809.js",
"refractor-prismjs-vendor.0abbb2f3.js": "/static/js/refractor-prismjs-vendor.0abbb2f3.931bae75.js",
"react-vendor.js": "/static/js/react-vendor.fb2283cb.js",
"refractor-prismjs-vendor.3665b250.js": "/static/js/refractor-prismjs-vendor.3665b250.f4f072e5.js",
"refractor-prismjs-vendor.a81a7d65.js": "/static/js/refractor-prismjs-vendor.a81a7d65.4102dc38.js",
"main.js": "/static/js/main.f401a063.js",
"refractor-prismjs-vendor.0abbb2f3.js": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js",
"react-vendor.js": "/static/js/react-vendor.03814a95.js",
"refractor-prismjs-vendor.3665b250.js": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js",
"refractor-prismjs-vendor.a81a7d65.js": "/static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js",
"index.html": "/index.html",
"main.0da2652e.css.map": "/static/css/main.0da2652e.css.map",
"main.d0cfd809.js.map": "/static/js/main.d0cfd809.js.map",
"refractor-prismjs-vendor.0abbb2f3.931bae75.js.map": "/static/js/refractor-prismjs-vendor.0abbb2f3.931bae75.js.map",
"react-vendor.fb2283cb.js.map": "/static/js/react-vendor.fb2283cb.js.map",
"refractor-prismjs-vendor.3665b250.f4f072e5.js.map": "/static/js/refractor-prismjs-vendor.3665b250.f4f072e5.js.map",
"refractor-prismjs-vendor.a81a7d65.4102dc38.js.map": "/static/js/refractor-prismjs-vendor.a81a7d65.4102dc38.js.map"
"main.f401a063.js.map": "/static/js/main.f401a063.js.map",
"refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map": "/static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js.map",
"react-vendor.03814a95.js.map": "/static/js/react-vendor.03814a95.js.map",
"refractor-prismjs-vendor.3665b250.eec550b5.js.map": "/static/js/refractor-prismjs-vendor.3665b250.eec550b5.js.map",
"refractor-prismjs-vendor.a81a7d65.e53936ae.js.map": "/static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js.map"
},
"entrypoints": [
"static/js/refractor-prismjs-vendor.3665b250.f4f072e5.js",
"static/js/refractor-prismjs-vendor.a81a7d65.4102dc38.js",
"static/js/refractor-prismjs-vendor.0abbb2f3.931bae75.js",
"static/js/react-vendor.fb2283cb.js",
"static/js/refractor-prismjs-vendor.3665b250.eec550b5.js",
"static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js",
"static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js",
"static/js/react-vendor.03814a95.js",
"static/css/main.0da2652e.css",
"static/js/main.d0cfd809.js"
"static/js/main.f401a063.js"
]
}
16 changes: 8 additions & 8 deletions badges.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.f4f072e5.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.4102dc38.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.931bae75.js"></script><script defer="defer" src="./static/js/react-vendor.fb2283cb.js"></script><script defer="defer" src="./static/js/main.d0cfd809.js"></script><link href="./static/css/main.0da2652e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="keywords" content="react,react-component,array-viewer,base-16,component,interactive,interactive-json,json,json-component,json-display,json-tree,json-view,json-viewer,json-inspector,json-tree,react,react-component,react-json,theme,tree,tree-view,treeview,jaywcjlove"><meta name="description" content="A React component for displaying and editing javascript arrays and JSON objects."><link rel="shortcut icon" href="/favicon.ico"><title>react-json-view</title><script defer="defer" src="./static/js/refractor-prismjs-vendor.3665b250.eec550b5.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.a81a7d65.e53936ae.js"></script><script defer="defer" src="./static/js/refractor-prismjs-vendor.0abbb2f3.4ed442e7.js"></script><script defer="defer" src="./static/js/react-vendor.03814a95.js"></script><script defer="defer" src="./static/js/main.f401a063.js"></script><link href="./static/css/main.0da2652e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
38 changes: 19 additions & 19 deletions lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ <h1>All files</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">93.92% </span>
<span class="strong">92.56% </span>
<span class="quiet">Statements</span>
<span class='fraction'>758/807</span>
<span class='fraction'>759/820</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">76.73% </span>
<span class="strong">76.37% </span>
<span class="quiet">Branches</span>
<span class='fraction'>442/576</span>
<span class='fraction'>443/580</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">84.78% </span>
<span class="strong">83.57% </span>
<span class="quiet">Functions</span>
<span class='fraction'>117/138</span>
<span class='fraction'>117/140</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">94.01% </span>
<span class="strong">92.57% </span>
<span class="quiet">Lines</span>
<span class='fraction'>722/768</span>
<span class='fraction'>723/781</span>
</div>


Expand Down Expand Up @@ -110,17 +110,17 @@ <h1>All files</h1>

<tr>
<td class="file high" data-value="src/comps"><a href="src/comps/index.html">src/comps</a></td>
<td data-value="97.29" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 97%"></div><div class="cover-empty" style="width: 3%"></div></div>
<td data-value="90.06" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
</td>
<td data-value="97.29" class="pct high">97.29%</td>
<td data-value="148" class="abs high">144/148</td>
<td data-value="88.02" class="pct high">88.02%</td>
<td data-value="142" class="abs high">125/142</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="20" class="abs high">18/20</td>
<td data-value="97.22" class="pct high">97.22%</td>
<td data-value="144" class="abs high">140/144</td>
<td data-value="90.06" class="pct high">90.06%</td>
<td data-value="161" class="abs high">145/161</td>
<td data-value="86.3" class="pct high">86.3%</td>
<td data-value="146" class="abs high">126/146</td>
<td data-value="81.81" class="pct high">81.81%</td>
<td data-value="22" class="abs high">18/22</td>
<td data-value="89.8" class="pct high">89.8%</td>
<td data-value="157" class="abs high">141/157</td>
</tr>

<tr>
Expand Down Expand Up @@ -236,7 +236,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/Container.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> Contain
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/TriangleArrow.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/TriangleSolidArrow.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/arrow</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/arrow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1><a href="../../index.html">All files</a> src/arrow</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
87 changes: 75 additions & 12 deletions lcov-report/src/comps/Copied.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">92.3% </span>
<span class="strong">71.15% </span>
<span class="quiet">Statements</span>
<span class='fraction'>36/39</span>
<span class='fraction'>37/52</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">90.32% </span>
<span class="strong">82.85% </span>
<span class="quiet">Branches</span>
<span class='fraction'>28/31</span>
<span class='fraction'>29/35</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">66.66% </span>
<span class="strong">50% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/6</span>
<span class='fraction'>4/8</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">91.66% </span>
<span class="strong">69.38% </span>
<span class="quiet">Lines</span>
<span class='fraction'>33/36</span>
<span class='fraction'>34/49</span>
</div>


Expand All @@ -61,7 +61,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
</div>
</template>
</div>
<div class='status-line high'></div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
Expand Down Expand Up @@ -149,7 +149,28 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -192,6 +213,27 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -278,7 +320,28 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
}
onCopied &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >onCopied(copyText, value);</span>
setCopied(true);
navigator.clipboard
&nbsp;
const _clipboard = navigator.clipboard || <span class="branch-1 cbranch-no" title="branch not covered" >{</span>
<span class="fstat-no" title="function not covered" > wr</span>iteText(text: string) {
<span class="cstat-no" title="statement not covered" > return new Promise(<span class="fstat-no" title="function not covered" >(r</span>eslove, reject) =&gt; {</span>
const textarea = <span class="cstat-no" title="statement not covered" >document.createElement('textarea');</span>
<span class="cstat-no" title="statement not covered" > textarea.style.position = 'absolute';</span>
<span class="cstat-no" title="statement not covered" > textarea.style.opacity = '0';</span>
<span class="cstat-no" title="statement not covered" > textarea.style.left = '-99999999px';</span>
<span class="cstat-no" title="statement not covered" > textarea.value = text;</span>
<span class="cstat-no" title="statement not covered" > document.body.appendChild(textarea);</span>
<span class="cstat-no" title="statement not covered" > textarea.select();</span>
<span class="cstat-no" title="statement not covered" > if (!document.execCommand('copy')) {</span>
<span class="cstat-no" title="statement not covered" > reject();</span>
} else {
<span class="cstat-no" title="statement not covered" > reslove();</span>
}
<span class="cstat-no" title="statement not covered" > textarea.remove();</span>
});
},
};
&nbsp;
_clipboard
.writeText(copyText)
.then(() =&gt; {
const timer = setTimeout(<span class="fstat-no" title="function not covered" >()</span> =&gt; {
Expand Down Expand Up @@ -328,7 +391,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion lcov-report/src/comps/KeyValues.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/comps</a
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-07-14T16:34:30.893Z
at 2024-08-06T02:05:03.992Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit dee90f1

Please sign in to comment.