File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"id" : " obsidian-custom-file-extensions-plugin" ,
3
3
"name" : " Custom File Extensions Plugin" ,
4
- "version" : " 1.2.0 " ,
4
+ "version" : " 1.2.1 " ,
5
5
"minAppVersion" : " 0.10.12" ,
6
6
"description" : " Associate views with custom file extensions via settings." ,
7
7
"author" : " Meep.Tech" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " obsidian-custom-file-extensions-plugin" ,
3
- "version" : " 1.2.0 " ,
3
+ "version" : " 1.2.1 " ,
4
4
"description" : " Associate views with custom file extensions via settings." ,
5
5
"main" : " build/main.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -11,24 +11,20 @@ export class EditExtensionModal extends Modal {
11
11
private plugin : CustomFileExtensions ,
12
12
private target : TAbstractFile ,
13
13
) {
14
- console . log ( "Opening modal" )
15
14
super ( plugin . app ) ;
16
15
this . target ??= this . plugin . app . vault . getRoot ( ) ;
17
16
18
17
this . _path = this . target . path . split ( "/" ) . slice ( 0 , - 1 ) . join ( "/" ) ;
19
- console . log ( this . _path ) ;
20
18
21
19
let lastPart = this . target . path
22
20
. split ( "/" )
23
21
. last ( ) ! ;
24
22
this . _name = lastPart . split ( "." ) [ 0 ] ! ;
25
- console . log ( this . _name ) ;
26
23
27
24
let lastParts = lastPart ?. split ( "." ) ! ;
28
25
this . _originalExtension
29
26
= this . _newExtension
30
27
= lastParts . length == 1 ? "" : lastParts . last ( ) ! ;
31
- console . log ( this . _originalExtension ) ;
32
28
}
33
29
34
30
onOpen ( ) {
Original file line number Diff line number Diff line change @@ -137,7 +137,12 @@ export class CustomFileExtensions extends Plugin {
137
137
/**@ts -expect-error */
138
138
this . app . viewRegistry . unregisterExtensions ( [ extension ] ) ;
139
139
} catch {
140
- console . log ( "ERROR" ) ;
140
+ const message = `Could not unregister extension: '${ extension } '` ;
141
+ new Notification ( "Error: Custom File Extensions Plugin" , {
142
+ body : message ,
143
+ } ) ;
144
+
145
+ console . error ( message ) ;
141
146
}
142
147
}
143
148
}
Original file line number Diff line number Diff line change 2
2
"1.0.0" : " 0.15.0" ,
3
3
"1.0.1" : " 0.15.0" ,
4
4
"1.1.0" : " 0.15.0" ,
5
- "1.2.0" : " 0.15.0"
5
+ "1.2.0" : " 0.15.0" ,
6
+ "1.2.1" : " 0.15.0"
6
7
}
You can’t perform that action at this time.
0 commit comments