Skip to content

Commit a6f53f9

Browse files
committed
Fix JS bug
1 parent a1272c7 commit a6f53f9

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/index.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,12 @@ const extension: JupyterFrontEndPlugin<void> = {
136136
// matches anywhere on filebrowser
137137
const selectorContent = ".jp-DirListing-content";
138138

139-
// matches all filebrowser items
139+
// matches directory filebrowser items
140140
const selectorOnlyDir = '.jp-DirListing-item[data-isdir="true"]';
141141

142+
// matches file filebrowser items
143+
const selectorNotDir = '.jp-DirListing-item[data-isdir="false"]';
144+
142145
// Create submenus
143146
const archiveFolder = new Menu({
144147
commands
@@ -231,14 +234,6 @@ const extension: JupyterFrontEndPlugin<void> = {
231234
);
232235
});
233236

234-
// matches anywhere on filebrowser
235-
const selectorContent = ".jp-DirListing-content";
236-
237-
// matches directory filebrowser items
238-
const selectorOnlyDir = '.jp-DirListing-item[data-isdir="true"]';
239-
// matches file filebrowser items
240-
const selectorNotDir = '.jp-DirListing-item[data-isdir="false"]';
241-
242237
// Add the 'downloadArchive' command to the file's menu.
243238
commands.addCommand(CommandIDs.downloadArchive, {
244239
execute: args => {

0 commit comments

Comments
 (0)