Audiotool board archive

Why are the characters in app.js not in english? (defrac)

i17 · started 2018-02-24 02:10 · updated 2018-02-25 08:10

Is the source code encrypted in such a way that it looks like english and chinese meshed together?

Comments (6)

2018-02-24 11:35 · 2018-02-24

It is minified using some UTF8 characters ranges. Without this, the javascript files would be even larger.

2018-02-24 15:20 · 2018-02-24

So, popular phrases like 'if', 'else', 'defrac', 'while', 'audiotool' and etc. are replaced with codes that can be decoded later?

i17 · reply
2018-02-24 15:51 · 2018-02-24

Ohhhh! It's basically there as a layer of protection against people who want to steal the source code, kind of like encryption.

i17 · reply
2018-02-24 16:02 · 2018-02-24

Sorry for all these dev questions just curious, but why doesn't Next have ids for each div element? I was trying to make a chrome extension that can save Next drafts locally, but it didn't work, since each only had a class specified. I also tried using document.body.innerHTML.replace() to replace the element's source code with "", but that somehow gives me a connection lost message. I even gave up and tried a Next touch support extension (simple, just replace all 'touch-action:none' with 'touch-action:auto'), but replacing the HTML doesn't work. If every element had an ID, I could just use document.getElementById("").outerHTML="". Why does Next not have ids for its' elements? Isn't it easier for the devs if there's an id assigned?

i17 · reply
2018-02-25 06:18 · 2018-02-25

What I was thinking was tracking every edit on a draft, and cloning it to a local draft (#/local/1), so that the draft remains local, and isn't saved online. This way, Next doesn't give you a connection lost message, even if you aren't online. But I guess Next will soon have an offline mode, right?

Potasmic · reply
2018-02-25 08:10 · 2018-02-25

Next saves your draft locally already. You simply cannot "launch" the app when you don't have a connection. But your drafts are still there in your computer. It is up to the Next team to decide if they should implement Service Workers (preferred) or AppCache. This is only part of the problem, as they would have to figure out how to deal with situations where people want to load samples, or load drafts that contain samples. It is simpler to shy away from this offline feature.