🎨 支持关闭 Google Analytics https://github.com/siyuan-note/siyuan/issues/6403
This commit is contained in:
parent
45358e487b
commit
638911c306
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ export const about = {
|
|||
<div class="b3-label__text">${window.siyuan.languages.googleAnalyticsTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<input class="b3-switch fn__flex-center" id="googleAnalytics" type="checkbox"${window.siyuan.config.system.googleAnalytics ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" id="googleAnalytics" type="checkbox"${window.siyuan.config.system.disableGoogleAnalytics ? "" : " checked"}>
|
||||
</label>
|
||||
<label class="b3-label fn__flex">
|
||||
<div class="fn__flex-1">
|
||||
|
|
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
@ -353,7 +353,7 @@ declare interface IConfig {
|
|||
xanadu: boolean
|
||||
udanax: boolean
|
||||
uploadErrLog: boolean
|
||||
googleAnalytics: boolean
|
||||
disableGoogleAnalytics: boolean
|
||||
downloadInstallPkg: boolean
|
||||
networkServe: boolean
|
||||
fixedPort: boolean
|
||||
|
|
|
@ -161,7 +161,7 @@ export const onGetConfig = (isStart: boolean) => {
|
|||
mountHelp();
|
||||
}
|
||||
|
||||
if (window.siyuan.config.system.googleAnalytics) {
|
||||
if (!window.siyuan.config.system.disableGoogleAnalytics) {
|
||||
try {
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Add table
Reference in a new issue