Are you sure you want to go to an external site to donate a monetary value?
WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
Some of my scripts won't work correctly if they are minified by this feature. So, is it possible for me to disable this feature on certain script or even provide minified version myself?
Minification is user initiated... you may choose to mention that something won't work... however it would be better to say why, which ones, and how much rather than just saying it doesn't on "some". As Doctors sometimes say when a patient says "It hurts when I do this."... "Then don't do it.". ES6 support should be sometime in the next few days... so what you are claiming by your general statement is that ES5 isn't minifying correctly... perhaps you could contribute to the community as a whole and figure out why... and of course let us know too. :)
I've tested a subset of the scripts here and they appear to be doing well including my own active ones... I will attempt to make some minor modifications to the defaults when and if necessary but UglifyJS2 is responsible for the forked minification on user initiated installation.
Re: @ts:
Just manually inspected your most installed script; Did a quick test of it on Weibo, and the output seems identical between native/raw and minified... So what is your issue? Anything in the error logs... if so include a url. I'll help you get started if you wish.
Re: @Marti:
When I wrote these scripts, I did not focused on minify them because I do not want keep my source code secretly.
Many comments need to be preserved in my code, since they are string (HTML blocks and CSS codes).
But UglifyJs removed them...
As the result, all HTML/CSS codes will be deleted by minification, and the script will not work totally.
I don't want to modify the source code to fit the minification, since it is too complex to do so.
Re: @ts:
That is exactly the reason OUJS is providing this option. In the past authors have posted minified versions of their scripts on the site, but we decided that minification != obfuscation so we wouldn't remove these scripts. However, if we provide automatic minification then they have no excuse to post an already minified script and we can remove it. Therefore source code isn't secret. The full unminified source will be posted on the site for everyone to see.
The method you're using to have multiline strings is an unstable hack. Have you considered using @resource and GM_getResourceText. You could put them in a public gist and use the Raw url for the @resource key. ES6 will provide template strings.
Otherwise just let your users know on the script description page not to install the minified version.
Re: @ts:
It shouldn't be removing comments... our current code for that is here. I kept comments for a variety of reasons including but not limited to Restructuring with a function expression.
Your issue on their repo predates mine here... thus is probably invalidated and dated.
You should subscribe to our issue at #432 and report any anomalies with our code there instead of OUJS here. I routinely update the first post in case there are items that need to be addressed... I added your concern yesterday in the list but it won't be "disabled" per say... just denoted... I'm still pondering this over there.
If any code trends towards obfuscation, this includes identifier mangling, that code and account will be tagged and possibly removed from OUJS... just a fore-warning that's in our TOS. @sizzle and I just connected about this yesterday which is why the minification routine shouldn't be mangling identifiers anymore.
Specific to licensing from your cited issue ... long term I can tell you if the
@copyright
and@license
keys are missing from the UserScript metadata block (and the OpenUserJS metadata block for libraries) it will most likely be blocked... currently it's a "grey" area and another issue to be resolved.For OUJS here... the option is experimental as it is denoted at this time and since I am the assignee I will consider all valid GitHub presented issues with it.
Your claim on Function Expressions is invalid so far.Anyhow... please continue this on GH as it's difficult to get this info disseminated to all the devs here on OUJS and is actively in flux.