Support » Plugin: CSS & JavaScript Toolbox » Syntax check result in YUICOMPRESSOR

  • Against JavaScript, YUICOMPRESSOR will do a grammar test. If there is a syntax error, to stop the process, it gives up the diet compacting. The following is a file that causes a syntax error.
    WordPress 5.0.1 :
    Errors will occur in the following files!

    wp-content/plugins/css-javascript-toolbox/framework/js/ace/worker-javascript.js
    wp-content/plugins/css-javascript-toolbox/frameworkvjs/ajax/cjt-server/cjt-server.js

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Hi there,

    How are you using the YUICOMPRESSOR solution – is it via a plugin?

    CSS & JavaScript Toolbox uses the third-party ACE editor (https://ace.c9.io) so the worker-javascript.js cannot be modified as it is a part of the editor library. I did run a test on the latest worker-javascript.js file (https://github.com/ajaxorg/ace-builds/blob/master/src/worker-javascript.js) via an online YUICOMPRESSOR version (https://www.piliapp.com/minify/yui-compressor) and it did indeed show a parse error.

    Sorry, not sure how to resolve this one.

    Kind Regards,
    Damian Baker

    Thank you for your every action!
    In Movable Type, YUICOMPRESSOR diet JavaScript from the beginning, and distributes one line scripted code from the beginning.
    AAA.js that the system calls with javascript src = “AAA.js” is a stressless script for all browsers on Earth via YUICOMPRESSOR processing.
    “AAA – source.js” is distributed at the same time, “AAA – source.js” is a so – called human – readable source code.

    > is it via a plugin?
    ANSWER: NO.

    1. Get JAVA.
    2. Get YUICOMPRESSOR.jar.
    3. For Windows users, install 7zip for gzip processing.
    4. If you are a Windows user, get the “Send by Right Click” application and “Right-click to send” the file with extension “.js” and extension “.css”.
    5. If you are a Windows user, use WinSCP to mirror / upload to WordPress on rental server.
    6. Revise “.htaccess” to automatically read the extension “.min.js.gz” or “.min.js”.

    `
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    order deny,allow
    allow from all
    ErrorDocument 403 http://fs4y.com

    <IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    # for .js.gz & .css.gz
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond “%{REQUEST_FILENAME}” \.(js|css)$
    RewriteCond “%{REQUEST_FILENAME}.gz” -s
    RewriteRule .+ %{REQUEST_URI}.gz [L]
    # for .min.js.gz
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond “%{REQUEST_FILENAME}” ^(.*)/([^/]*)\.js$
    RewriteCond “%1/%2.min.js.gz” -s
    RewriteRule ([^/]*)\.js$ $1.min.js.gz [L]
    # for .min.css.gz
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond “%{REQUEST_FILENAME}” ^(.*)/([^/]*)\.css$
    RewriteCond “%1/%2.min.css.gz” -s
    RewriteRule ([^/]*)\.css$ $1.min.css.gz [L]
    # for .min.js
    RewriteCond “%{REQUEST_FILENAME}” ^(.*)/([^/]*)\.js$
    RewriteCond “%1/%2.min.js” -s
    RewriteRule ([^/]*)\.js$ $1.min.js [L]
    # for .min.css
    RewriteCond “%{REQUEST_FILENAME}” ^(.*)/([^/]*)\.css$
    RewriteCond “%1/%2.min.css” -s
    RewriteRule ([^/]*)\.css$ $1.min.css [L]
    </IfModule>
    AddType “text/javascript;charset=UTF-8” .gz
    AddType “text/css;charset=UTF-8” .gz
    AddEncoding gzip .gz
    AddHandler cgi-script htaccess
    #AddType application/x-shockwave-flash swf
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault “access plus 30 days”
    ExpiresByType text/html “access plus 30 days”
    ExpiresByType text/css “access plus 30 days”
    ExpiresByType text/js “access plus 30 days”
    ExpiresByType text/javascript “access plus 30 days”
    ExpiresByType application/javascript “access plus 30 days”
    ExpiresByType application/x-javascript “access plus 30 days”
    ExpiresByType image/gif “access plus 30 days”
    ExpiresByType image/jpeg “access plus 30 days”
    ExpiresByType image/png “access plus 30 days”
    ExpiresByType application/vnd.ms-fontobject “access plus 30 days”
    ExpiresByType application/x-font-ttf “access plus 30 days”
    ExpiresByType application/x-font-opentype “access plus 30 days”
    ExpiresByType application/x-font-woff “access plus 30 days”
    ExpiresByType application/x-shockwave-flash “access plus 30 days”
    </IfModule>
    <IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-font-woff
    </IfModule>
    <FilesMatch “\.(ico|flv|gif|jpg|jpeg|png|swf|js|css|pdf|mp3|mp4|gz|eot|svg|ttf|woff)$”>
    Header set Cache-Control “max-age=2592000, public”
    </FilesMatch>
    `

    For details, various codes are provided in my blog. However, after the visit, although Google translation works just after onload, it is a machine translation, so it must be a sentence not translated. It is automation of Google translation so as not to cause garbled characters. I am sorry.
    https://motpresse.votre.space/htaccess/#YUICOMPRESSOR

    Your and our WordPress has evolved to 5.2. A report on error files during JavaScript diet by YUICOMPRESSOR has been uploaded to GitLab.
    https://gitlab.com/Ujiki.oO/error-state-javascript-provided-by-wordpress/snippets/1855588
    WordPressは5.2に進化しています。YUICOMPRESSORによるJavaScriptダイエット時のエラーファイルについてのレポートを、GitLabにアップしました。

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.