File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,11 @@ const html = `
8484 <script>
8585
8686 // decode link
87- let link = (new URL(window.location.href)).searchParams.get('url');
87+
88+ const url = new URL(window.location.href).searchParams;
89+
90+ let link = url.get('url');
91+ let embed = url.get('embed');
8892
8993 const isDev = window.location.href.includes('dev');
9094
@@ -93,7 +97,7 @@ const html = `
9397
9498 if (!isDev) link = 'https://cde.run/' + link;
9599 else link = 'https://cde.run/' + link;
96-
100+
97101 }
98102
99103 if (link && link.startsWith('https:/github.com')) {
@@ -104,12 +108,12 @@ const html = `
104108
105109 if (link) {
106110
111+ if (embed) link += '?embed=true';
112+
107113 const resp = decodeLink(link);
108114
109- console.log(link);
110-
111115 // redirect to decoded URL
112- // window.location.href = resp;
116+ window.location.href = resp;
113117
114118 } else {
115119
You can’t perform that action at this time.
0 commit comments