|
22 | 22 | DISABLEDFILLCOLOR, DISABLEDSTROKECOLOR, docById, DOUBLEFLAT, |
23 | 23 | DOUBLESHARP, DRUMNAMES, EASTINDIANSOLFNOTES, EFFECTSNAMES, |
24 | 24 | EXPANDBUTTON, FILTERTYPES, FLAT, getDrumName, getDrumSynthName, |
25 | | - getModeNumbers, getNoiseName, getNoiseSynthName, getTemperament, |
26 | | - getTemperamentKeys, getTemperamentsList, getTextWidth, |
27 | | - getVoiceSynthName, hideDOMLabel, HIGHLIGHTSTROKECOLORS, |
| 25 | + getModeNumbers, getNoiseName, getTemperament, |
| 26 | + getTemperamentKeys, getTemperamentsList, getTextWidth, hideDOMLabel, HIGHLIGHTSTROKECOLORS, |
28 | 27 | i18nSolfege, INVERTMODES, isCustomTemperament, last, MEDIASAFEAREA, |
29 | 28 | NATURAL, NOISENAMES, NSYMBOLS, NUMBERBLOCKDEFAULT, OSCTYPES, |
30 | 29 | PALETTEFILLCOLORS, PALETTEHIGHLIGHTCOLORS, PALETTESTROKECOLORS, |
@@ -225,7 +224,7 @@ const _blockMakeBitmap = (data, callback, args) => { |
225 | 224 | callback(bitmap, args); |
226 | 225 | }; |
227 | 226 |
|
228 | | - img.src = "data:image/svg+xml;base64," + window.btoa(base64Encode(data)); |
| 227 | + img.src = "data:image/svg+xml;base64," + window.btoa(COLLAPSEBUTTON); |
229 | 228 | }; |
230 | 229 |
|
231 | 230 | /** |
@@ -963,8 +962,7 @@ class Block { |
963 | 962 |
|
964 | 963 | if (this.image.search("xmlns") !== -1) { |
965 | 964 | image.src = |
966 | | - "data:image/svg+xml;base64," + |
967 | | - window.btoa(base64Encode(this.image)); |
| 965 | + "data:image/svg+xml;base64," + window.btoa(this.image); |
968 | 966 | } else { |
969 | 967 | image.src = this.image; |
970 | 968 | } |
@@ -1516,7 +1514,7 @@ class Block { |
1516 | 1514 |
|
1517 | 1515 | image.src = |
1518 | 1516 | "data:image/svg+xml;base64," + |
1519 | | - window.btoa(base64Encode(COLLAPSEBUTTON)); |
| 1517 | + window.btoa(COLLAPSEBUTTON); |
1520 | 1518 | }; |
1521 | 1519 |
|
1522 | 1520 | /** |
@@ -1549,7 +1547,7 @@ class Block { |
1549 | 1547 |
|
1550 | 1548 | image.src = |
1551 | 1549 | "data:image/svg+xml;base64," + |
1552 | | - window.btoa(base64Encode(EXPANDBUTTON)); |
| 1550 | + window.btoa(EXPANDBUTTON); |
1553 | 1551 | }; |
1554 | 1552 |
|
1555 | 1553 | /** |
@@ -2939,9 +2937,9 @@ class Block { |
2939 | 2937 | if ( |
2940 | 2938 | that?.name === "vspace" && |
2941 | 2939 | that.blocks.blockList[that.connections[1]]?.name === "rest2" |
2942 | | - ) { |
| 2940 | + ) { |
2943 | 2941 | return; |
2944 | | - } |
| 2942 | + } |
2945 | 2943 |
|
2946 | 2944 | // Do not allow a stack of blocks to be dragged if the stack contains a silence block. |
2947 | 2945 | let block = that.blocks.blockList[that.connections[1]]; |
@@ -3379,21 +3377,20 @@ class Block { |
3379 | 3377 |
|
3380 | 3378 | const labelElem = docById("labelDiv"); |
3381 | 3379 |
|
3382 | | - var safetext = function(text){ |
| 3380 | + const safetext = (text) => { |
3383 | 3381 | // Best to avoid using these special characters in text strings |
3384 | 3382 | // without first converting them to their "safe" form. |
3385 | | - var table = { |
3386 | | - '<': 'lt', |
3387 | | - '>': 'gt', |
3388 | | - '"': 'quot', |
3389 | | - '\'': 'apos', |
3390 | | - '&': 'amp', |
3391 | | - '\r': '#10', |
3392 | | - '\n': '#13' |
| 3383 | + const table = { |
| 3384 | + "<": "lt", |
| 3385 | + ">": "gt", |
| 3386 | + '"': "quot", |
| 3387 | + "'": "apos", |
| 3388 | + "&": "amp", |
| 3389 | + "\r": "#10", |
| 3390 | + "\n": "#13" |
3393 | 3391 | }; |
3394 | | - |
3395 | | - return text.toString().replace(/[<>"'\r\n&]/g, function(chr){ |
3396 | | - return '&' + table[chr] + ';'; |
| 3392 | + return text.toString().replace(/[<>"'\r\n&]/g, (chr) => { |
| 3393 | + return "&" + table[chr] + ";"; |
3397 | 3394 | }); |
3398 | 3395 | }; |
3399 | 3396 |
|
|
0 commit comments