-
Notifications
You must be signed in to change notification settings - Fork 60.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync fork #4582
Closed
Closed
sync fork #4582
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
47a4436
Update layout.tsx
yjding d4c89b5
Update sidebar.tsx
yjding 1c97b77
Update chat.tsx
yjding 7e91336
Merge pull request #1 from yjding/Remove-titles
yjding 6e9491f
Update index.ts
yjding 76e23df
Create user_agent_validator.js
yjding 204c696
Update layout.tsx
yjding 7c30bd0
Add files via upload
yjding 1a51c70
Delete app/user_agent_validator.js
yjding 7b9ccaa
Merge pull request #2 from yjding/default-to-chinese
yjding 1717480
Add back the settings icon
yjding 2c9ed30
Remove settings button
yjding 03d457d
Merge branch 'main' into main
yjding 960c29c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 2c2eac5
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 765bdd4
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 9975f01
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 5898ec9
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 7edffce
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 006b0b7
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user c444260
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user f2a899d
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user a778141
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 58a81c6
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user dfead51
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user e061f01
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user 9db098c
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var ua = navigator.userAgent.toLowerCase(); | ||
var isWeixin = ua.indexOf('micromessenger') != -1; | ||
var isAndroid = ua.indexOf('android') != -1; | ||
var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1); | ||
if (!isWeixin) { | ||
document.head.innerHTML = '<title>抱歉,出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">'; | ||
document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>'; | ||
} | ||
Comment on lines
+5
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid direct manipulation of - document.head.innerHTML = '<title>抱歉,出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
- document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
+ const title = document.createElement('title');
+ title.textContent = '抱歉,出错了';
+ document.head.appendChild(title);
+ // Add other head elements similarly
+ const bodyDiv = document.createElement('div');
+ bodyDiv.className = 'weui_msg';
+ bodyDiv.innerHTML = '<div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div>';
+ document.body.appendChild(bodyDiv);
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace
var
withconst
and use strict equality checks.Committable suggestion