Latest post 04-19-2009 1:22 by boryi2009. 5 replies.
  • 08-17-2008 19:02

    With huge javascript files the compressor's output doesn't work...

    I tried the compressor with a huge javascript file, containing a whole javascript-based game.

    the script:
    http://www.levensweg.net/tetris/tetrisattack.js

    If i compress it, even without those BASE and shrink values options, the output WILL NOT work. I dont know why, but my game doesn't do anything with its output.

    The game is playable - with the original script - online @ http://www.levensweg.net/tetris/
    i need to compress it... so plz fix it :P

    BTW, there is absolutely no UBB or even a line break support on this forum...
    why???

    EDIT:
    i just found out i can just put HTML on this forum :P
    Even if the output doesn't work... it's a GREAT compressor! it compressed almost 50%

  • 08-18-2008 18:11 In reply to

    Re: Compressor's output doesn't work...

    You might be missing a ; some ware in the code.  You can use JsLint to help find the bug.  You might only be able to do jsmin.  Rember that a=function () {} should have a ; after it.  This is my most common problem with javascript.

  • 09-10-2008 2:38 In reply to

    • Boryi
    • Top 25 Contributor
    • Joined on 09-10-2008
    • Posts 1

    Re: Compressor's output doesn't work...

    Try http://www.boryi.com

    [free] [online] javascript obfuscator
    [free] [online] javascript/html/css/xml/xslt compressor

  • 12-19-2008 10:28 In reply to

    Re: Compressor's output doesn't work...

    "Base62 encode" error:

    1. I checked my javascript code using various validators and found all "missing ;"
    2. All javascripts work just fine when loaded uncompressed, but once I compress it here using "Base62 encode", I get following FireFox error:

    "missing ; before statement"

    So I took a look and already after few first characters in compressed code I found following:
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};

    As far as my limited knowledge goes, I would say that it should look like this:
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36));};

    Where focus is on the end of this code:
    )}; versus );};

    These ; missing in Base62 encoded code are more.

    Is this correct?.

  • 12-19-2008 17:36 In reply to

    Re: Compressor's output doesn't work...

    Javascript dose not require the ";" if there is a new line between the commands, but if the commands are on the same line

    example: alert(1);alert(2);

    then the ";" is required.  This is why your code is working before you compress the code, adding the ";" where the validators are telling you to should fix this problem. 

    Note that the Packer make all the commands into one long line of code

  • 04-19-2009 1:22 In reply to

    Re: With huge javascript files the compressor's output doesn't work...

    Visit www.boryi.com for free javascript, xml, css, html compressing tools.

    Make sure your javascript file are properly ended with semi-colon ";"

Page 1 of 1 (6 items) | RSS