generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
PublishLoad.js
38 lines (33 loc) · 1.17 KB
/
PublishLoad.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// META-BIND OBSIDIAN PUBLISH SCRIPT
// add this script to the end of you publish.js
// this script loads and executes the latest version of the meta-bind plugin for obsidian publish
// The plugin settings. Not all settings are used.
let mb_settingsString = `{
"devMode": false,
"ignoreCodeBlockRestrictions": false,
"preferredDateFormat": "YYYY-MM-DD",
"useUsDateInputOrder": false,
"firstWeekday": {
"index": 1,
"name": "Monday",
"shortName": "Mo"
},
"syncInterval": 50,
"minSyncInterval": 1000,
"maxSyncInterval": 50,
"enableJs": true,
"inputFieldTemplates": [],
"excludedFolders": [],
"dateFormat": "eu"
}`;
// if true, the script is pulled from the master branch instead of the release branch
const mb_dev_mode = false;
const mb_settings = JSON.parse(mb_settingsString);
async function mb_load() {
const response = mb_dev_mode
? await fetch('https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/master/Publish.js')
: await fetch('https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/release/Publish.js');
const script = await response.text();
eval(script);
}
mb_load();