Spaces:
Running
Running
Update src/lib/libraries/extension-tags.js
Browse files
src/lib/libraries/extension-tags.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import messages from './tag-messages.js';
|
2 |
|
3 |
-
|
4 |
{ tag: 'penguinmod', intlLabel: messages.penguinmod },
|
5 |
{ tag: 'turbowarp', intlLabel: messages.turbowarp },
|
6 |
{ tag: 'scratch', intlLabel: messages.scratch },
|
@@ -19,19 +19,17 @@ const tags = [
|
|
19 |
{ tag: 'divider3', intlLabel: messages.scratch, type: 'divider' },
|
20 |
{ tag: 'divider1', intlLabel: 'Actions', type: 'title' },
|
21 |
{ tag: 'custom', intlLabel: messages.customextension, type: 'custom', func: (library) => {
|
22 |
-
library.select('');
|
23 |
} },
|
24 |
];
|
25 |
|
26 |
-
//
|
27 |
if (typeof ENV !== 'undefined' && ENV.CanLoadCustomExtension === false) {
|
28 |
-
|
29 |
-
// tagが 'custom' の要素を除外する
|
30 |
-
export default tags.filter(item => {
|
31 |
if (item.tag === 'divider1' && item.intlLabel === 'Actions') return false;
|
32 |
if (item.tag === 'custom') return false;
|
33 |
return true;
|
34 |
});
|
35 |
-
} else {
|
36 |
-
export default tags;
|
37 |
}
|
|
|
|
|
|
1 |
import messages from './tag-messages.js';
|
2 |
|
3 |
+
let tags = [
|
4 |
{ tag: 'penguinmod', intlLabel: messages.penguinmod },
|
5 |
{ tag: 'turbowarp', intlLabel: messages.turbowarp },
|
6 |
{ tag: 'scratch', intlLabel: messages.scratch },
|
|
|
19 |
{ tag: 'divider3', intlLabel: messages.scratch, type: 'divider' },
|
20 |
{ tag: 'divider1', intlLabel: 'Actions', type: 'title' },
|
21 |
{ tag: 'custom', intlLabel: messages.customextension, type: 'custom', func: (library) => {
|
22 |
+
library.select('');
|
23 |
} },
|
24 |
];
|
25 |
|
26 |
+
// 条件によって tags をフィルター
|
27 |
if (typeof ENV !== 'undefined' && ENV.CanLoadCustomExtension === false) {
|
28 |
+
tags = tags.filter(item => {
|
|
|
|
|
29 |
if (item.tag === 'divider1' && item.intlLabel === 'Actions') return false;
|
30 |
if (item.tag === 'custom') return false;
|
31 |
return true;
|
32 |
});
|
|
|
|
|
33 |
}
|
34 |
+
|
35 |
+
export default tags;
|