This commit is contained in:
Liang Ding 2022-10-30 00:42:28 +08:00
parent 45358e487b
commit 638911c306
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 3 additions and 3 deletions

View file

@ -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">

View file

@ -353,7 +353,7 @@ declare interface IConfig {
xanadu: boolean
udanax: boolean
uploadErrLog: boolean
googleAnalytics: boolean
disableGoogleAnalytics: boolean
downloadInstallPkg: boolean
networkServe: boolean
fixedPort: boolean

View file

@ -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