-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Magic Editor easily / user-extendible? #143
Comments
I've been thinking about adding user-expandability wrt. the substitutions from some time. My opinion is that it would be beneficial. I have not previously considered loading additional substitution rules from a supplied URL, but I can see that it might be useful. As to WhatsApp, I've added to my version of the development branch, so it will be in the next version. Frankly, I thought it was already in there. |
Me and Mogsdad did discuss this when we we're originally developing the script, but we dropped it when we realized that you can't store functions in JSON. |
@Tiny-Giant What if the addition is only regex/replacement pairs, with no functions involved? I think regex can be stored as text and later processed so this shouldn't be a problem (I'm no JavaScript guy so IDK). |
There appears to be two different goals here:
I must admit that I'd been assuming just regex/replacement string pairs. While it would be possible to support functions, that would be more complex and have significant security concerns. I think that we're getting way ahead of ourselves to be thinking of offloading all of |
Definitely, if it were limited to just regular expressions and plain substitutions, that would be much simpler and completely possible with JSON. I was just commenting as to the problem we ran in to when we were discussing this topic originally that caused us to table the issue at that time. We had wanted to move the |
I took a brief look at Magic Editor's code and found that it's based on a truckload of regexes.
I use that on Android Enthusiasts frequently, but one thing I'm having is that those regexes don't cover WhatsApp, which comes rather often on AE.
While it's possible that I just add a regex for that specific one, I would also like it if it's easily extendible, without modifying existing code. For example, SE AutoComments provides a way to customize the predefined comments via an arbitrary URL to a JSONP file and loads comments from there. Is it possible to have Magic Editor load extra regexes (and replacements) from user-specified external sources? Or in any other way user-extendible?
The text was updated successfully, but these errors were encountered: