mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
fix: set codesandbox referrer to no-referrer (#22688)
* fix: set referrer to no-referrer * fix: use <a> replace form * refactoring: remove useless code * fix: refine css issue
This commit is contained in:
parent
7b94e0bfb2
commit
c806a836e5
@ -341,6 +341,7 @@
|
||||
}
|
||||
|
||||
&-codesandbox {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
|
@ -22,7 +22,7 @@
|
||||
<link rel="stylesheet/less" type="text/css" href="{{ root }}color.less" />
|
||||
<script src="https://polyfill.alicdn.com/polyfill.min.js?features=default,es2015,Intl"></script>
|
||||
<script>
|
||||
(function() {
|
||||
(function () {
|
||||
function isLocalStorageNameSupported() {
|
||||
var testKey = 'test';
|
||||
var storage = window.localStorage;
|
||||
@ -100,10 +100,10 @@
|
||||
</script>
|
||||
<!-- Hotjar Tracking Code for ant.design -->
|
||||
<script>
|
||||
(function(h, o, t, j, a, r) {
|
||||
(function (h, o, t, j, a, r) {
|
||||
h.hj =
|
||||
h.hj ||
|
||||
function() {
|
||||
function () {
|
||||
(h.hj.q = h.hj.q || []).push(arguments);
|
||||
};
|
||||
h._hjSettings = { hjid: 473408, hjsv: 5 };
|
||||
|
@ -332,22 +332,18 @@ ${parsedSourceCode.replace('mountNode', "document.getElementById('container')")}
|
||||
/>
|
||||
</Tooltip>
|
||||
</form>
|
||||
<form
|
||||
action="https://codesandbox.io/api/v1/sandboxes/define"
|
||||
method="POST"
|
||||
target="_blank"
|
||||
onClick={() => this.track({ type: 'codesandbox', demo: meta.id })}
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
name="parameters"
|
||||
value={compress(JSON.stringify(codesanboxPrefillConfig))}
|
||||
/>
|
||||
<form>
|
||||
<Tooltip title={<FormattedMessage id="app.demo.codesandbox" />}>
|
||||
<input
|
||||
type="submit"
|
||||
value="Create New Sandbox with Prefilled Data"
|
||||
{/* FIXME: This temporarily solution to fix issues/22636, we need revert it to use form after the codesandbox api issue fixed. */}
|
||||
<a
|
||||
aria-label="Create New Sandbox with Prefilled Data"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
href={`https://codesandbox.io/api/v1/sandboxes/define?parameters=${compress(
|
||||
JSON.stringify(codesanboxPrefillConfig),
|
||||
)}`}
|
||||
className="code-box-codesandbox"
|
||||
onClick={() => this.track({ type: 'codesandbox', demo: meta.id })}
|
||||
/>
|
||||
</Tooltip>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user