Skip to content

Commit

Permalink
fix(script): 优化屏蔽复制粘贴限制
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Apr 21, 2023
1 parent 7fe2253 commit 3c124c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/scripts/src/projects/cx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ export const CXProject = Project.create({
content:
'http协议下浏览器不支持剪贴板,无法解除输入框无法复制粘贴限制,请点击确认脚本将帮助你切换到https网站。',
onConfirm() {
try {
if (top) {
top.window.location.protocol = 'https:';
}
} catch {
window.location.protocol = 'https:';
}
});
Expand Down

0 comments on commit 3c124c3

Please sign in to comment.