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
1111# Don't include the compiled main.js file in the repo.
1212# They should be uploaded to GitHub releases instead.
1313main.js
14- PublishLoad.js
1514
1615# Exclude sourcemaps
1716* .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