- return {
- id: 'open-git-history',
- name: 'Open Commit History on GitHub',
- checkCallback: this.giveGithubCallback(
- this.openGithubHistory.bind(this)
- ),
- };
- };
-
- /**
- * the same function needs to be passed, so that the reference is the same,
- * so that `.off` works; otherwise a new function reference would be generated
- */
- fileMenuCallbackFunc = (
- menu: Menu,
- file: TAbstractFile,
- source: string
- ) => {
- if (file instanceof TFile) {
- const publish = publishState(this.app, file);
- if (!publish) {