mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
710e703867
commit
938f7d2944
1 changed files with 27 additions and 24 deletions
|
|
@ -30,6 +30,7 @@ import {showMessage} from "../dialog/message";
|
||||||
import {replaceLocalPath} from "../editor/rename";
|
import {replaceLocalPath} from "../editor/rename";
|
||||||
import {editor} from "../config/editor";
|
import {editor} from "../config/editor";
|
||||||
import {goBack, goForward} from "./backForward";
|
import {goBack, goForward} from "./backForward";
|
||||||
|
import {addScript} from "../protyle/util/addScript";
|
||||||
|
|
||||||
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
|
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
|
||||||
if (key1 === "general") {
|
if (key1 === "general") {
|
||||||
|
|
@ -162,6 +163,7 @@ export const onGetConfig = (isStart: boolean) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!window.siyuan.config.system.disableGoogleAnalytics) {
|
if (!window.siyuan.config.system.disableGoogleAnalytics) {
|
||||||
|
addScript("https://www.googletagmanager.com/gtag/js?id=G-L7WEXVQCR9", "gaScript").then(() => {
|
||||||
try {
|
try {
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
window.gtag = function (...args) {
|
window.gtag = function (...args) {
|
||||||
|
|
@ -187,6 +189,7 @@ export const onGetConfig = (isStart: boolean) => {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue