File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ Publish.js linguist-generated
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ node_modules
11
11
# Don't include the compiled main.js file in the repo.
12
12
# They should be uploaded to GitHub releases instead.
13
13
main.js
14
- PublishLoad.js
15
14
16
15
# Exclude sourcemaps
17
16
* .map
Original file line number Diff line number Diff line change
1
+ // META-BIND OBSIDIAN PUBLISH SCRIPT
2
+ // add this script to the end of you publish.js
3
+ // this script loads and executes the latest version of the meta-bind plugin for obsidian publish
4
+
5
+ // The plugin settings. Not all settings are used.
6
+ let mb_settingsString = `{
7
+ "devMode": false,
8
+ "preferredDateFormat": "YYYY-MM-DD",
9
+ "useUsDateInputOrder": false,
10
+ "syncInterval": 50,
11
+ "minSyncInterval": 1000,
12
+ "maxSyncInterval": 50,
13
+ "inputTemplates": "",
14
+ "dateFormat": "eu"
15
+ }` ;
16
+
17
+ // if true, the script is pulled from the master branch instead of the release branch
18
+ const mb_dev_mode = false ;
19
+
20
+ const mb_settings = JSON . parse ( mb_settingsString ) ;
21
+
22
+ async function mb_load ( ) {
23
+ const response = mb_dev_mode
24
+ ? await fetch ( 'https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/master/Publish.js' )
25
+ : await fetch ( 'https://raw.githubusercontent.com/mProjectsCode/obsidian-meta-bind-plugin/release/Publish.js' ) ;
26
+ const script = await response . text ( ) ;
27
+ eval ( script ) ;
28
+ }
29
+
30
+ await mb_load ( ) ;
You can’t perform that action at this time.
0 commit comments