Skip to main content
Perrin_Ennen
Community Advisor
Community Advisor
Sep 7, 2021 2:13 PM UTC
Solved

at.js inside javascript minified - script license

Hello, I want to put the code of the at.js in a wrapper. There is custom js like an if query for a consent. Nothing is changed inside the at.js code - only around the outside. Can I minify all this and write the with licenses over it?

 

Example:

/** * @1585722 * .. custom code .. * * @1585722 * at.js 2.6.1 | (c) Adobe Systems Incorporated | All rights reserved * zepto.js | (c) 2010-2016 Thomas Fuchs | zeptojs.com/license * * object-assign * (c) Sindre Sorhus * @1585722 MIT */ ... custom code ... at.js 2.6.1 code ... custom code ...

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Gokul_Agiwal
Gokul_AgiwalAccepted solution
Community Advisor
Sep 16, 2021 4:09 PM UTC

Any particular reason doing that? if you download at.js version that already been minify. 

 

May be you need to try this 

 

 /**
 * @License
 *  
 * @License
 * at.js 2.6.1 | (c) Adobe Systems Incorporated | All rights reserved
 *   
 */
// Wrapper function which executed on library loaded event
(function() {
    ... 
    at.js minify version script
    ...
})();

 

Thanks, Gokul

3 replies

Gokul_Agiwal
Community Advisor
Community Advisor
Sep 13, 2021 9:45 AM UTC

Hi @perrin_ennen 

From above what I understood is, you need to minify at.js script and then once it's minify you need to add in JavaScript function wrapper along with custom license information in comment. 

 

Is this understanding correct? 

Translate
Thanks, Gokul
Perrin_Ennen
Community Advisor
Community Advisor
Sep 14, 2021 4:04 PM UTC

Yes exactly.

Translate
Gokul_Agiwal
Community Advisor
Gokul_AgiwalCommunity AdvisorAccepted solution
Community Advisor
Sep 16, 2021 4:09 PM UTC

Any particular reason doing that? if you download at.js version that already been minify. 

 

May be you need to try this 

 

 /**
 * @License
 *  
 * @License
 * at.js 2.6.1 | (c) Adobe Systems Incorporated | All rights reserved
 *   
 */
// Wrapper function which executed on library loaded event
(function() {
    ... 
    at.js minify version script
    ...
})();

 

Translate
Thanks, Gokul