The idea came to me when I wanted to test the performance of the same code in two versions of Pale Moon (one old and one more current), so I imagine that there could be more people interested in doing something similar but with other browsers.
To achieve this I deminified and transpiled the original code with BabelJS along with some later modifications I was doing so that it could work well in Pale Moon 27 (I had to convert it into a Greasemonkey/Tampermonkey userscript because of the additional code that runs in the sandbox).
In fact, I managed to get it working without any major hiccups, except for these problems that I couldn't solve:
The cursor in the text area to place the codes returns to the initial position when typing something.
I had to change $.setBaseAndExtent(J, re, fe, ve) to null since there doesn't seem to be an equivalent or polyfill for browsers that don't have it implemented.
Upon further review I noticed that the page does not use a real textarea but rather one emulated with HTML and Javascript, so maybe both problems could be solved by changing it to something like https://github.com/adriancs2/Textarea-Syntax-Highlight (which uses a textarea with a tag code behind it that is updated on the fly) which in turn would perhaps resolve the bugs reported in #48 and #72.
Another option as a code editor could be Ace, which is used in sites like OnlineGDB and seems easy to implement.
By old browsers I mean those that are compatible with ECMAScript 5 (perhaps also adding some of the polyfills mentioned at https://www.kriasoft.com/universal-router/#browser-support ).
The idea came to me when I wanted to test the performance of the same code in two versions of Pale Moon (one old and one more current), so I imagine that there could be more people interested in doing something similar but with other browsers.
To achieve this I deminified and transpiled the original code with BabelJS along with some later modifications I was doing so that it could work well in Pale Moon 27 (I had to convert it into a Greasemonkey/Tampermonkey userscript because of the additional code that runs in the sandbox).
In fact, I managed to get it working without any major hiccups, except for these problems that I couldn't solve:
$.setBaseAndExtent(J, re, fe, ve)
tonull
since there doesn't seem to be an equivalent or polyfill for browsers that don't have it implemented.Upon further review I noticed that the page does not use a real textarea but rather one emulated with HTML and Javascript, so maybe both problems could be solved by changing it to something like https://github.com/adriancs2/Textarea-Syntax-Highlight (which uses a textarea with a tag code behind it that is updated on the fly) which in turn would perhaps resolve the bugs reported in #48 and #72.
Another option as a code editor could be Ace, which is used in sites like OnlineGDB and seems easy to implement.
Finally, this is the userscript I was doing: jsbench.me_for_old_browsers.user.js.txt