Skip to content

Commit

Permalink
Collapse URLs on layout-change instead of file-open.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Chan committed May 23, 2021
1 parent c0eb499 commit 70b855b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class HideUrls extends Plugin {
}

async onload() {
this.app.workspace.on('file-open', () => {
this.app.workspace.on('layout-change', () => {
let view = this.app.workspace.activeLeaf.view;
if (view instanceof MarkdownView) {
let cm = view.sourceMode.cmEditor;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "collapse-urls",
"name": "Collapse URLs",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"author": "matthewhchan",
"isDesktopOnly": false
Expand Down

0 comments on commit 70b855b

Please sign in to comment.