mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
🎨 支持关闭 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 class="b3-label__text">${window.siyuan.languages.googleAnalyticsTip}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__space"></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>
|
||||||
<label class="b3-label fn__flex">
|
<label class="b3-label fn__flex">
|
||||||
<div class="fn__flex-1">
|
<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
|
xanadu: boolean
|
||||||
udanax: boolean
|
udanax: boolean
|
||||||
uploadErrLog: boolean
|
uploadErrLog: boolean
|
||||||
googleAnalytics: boolean
|
disableGoogleAnalytics: boolean
|
||||||
downloadInstallPkg: boolean
|
downloadInstallPkg: boolean
|
||||||
networkServe: boolean
|
networkServe: boolean
|
||||||
fixedPort: boolean
|
fixedPort: boolean
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ export const onGetConfig = (isStart: boolean) => {
|
||||||
mountHelp();
|
mountHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.siyuan.config.system.googleAnalytics) {
|
if (!window.siyuan.config.system.disableGoogleAnalytics) {
|
||||||
try {
|
try {
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue