New Posts  All Forums:Forum Nav:

Code compactor.

post #1 of 3
Thread Starter 
Does anyone know of a good "code compactor." What I mean is something that would change jQuery classes etc. into random strings etc. and compact all the code (html, css, jQuery) into one big block?

Like make this:
Code:
<script>new (require("ServerJS"))().handle({"require":[["lowerDomain"],["QuicklingPrelude"],["Primer"]]})</script></head><body class="hasLeftCol home composerExpanded fbx safari4 win Locale_en_GB"><div id="FB_HiddenContainer" style="position:absolute; top:-10000px; width:0px; height:0px;"></div><div id="pagelet_bluebar" data-referrer="pagelet_bluebar"><div id="blueBarHolder" class="slim"><div id="blueBar" class="fixed_elem"><div id="pageHead" class="clearfix" role="banner"><h1 id="pageLogo" class="pixelSnapped"><a href="http://www.facebook.com/?ref=logo" title="Home"></a></h1><div id="jewelContainer" class="notifNegativeBase notifCentered"><div class="fbJewel" id="fbRequestsJewel"><a class="jewelButton" rel="toggle" href="#" role="button" aria-labelledby="requestsCountWrapper" name="requests" data-gt="&#123;&quot;ua_id&quot;:&quot;jewel:requests&quot;&#125;" data-target="fbRequestsFlyout" aria-haspopup="true" aria-owns="fbRequestsFlyout"><span class="jewelCount" id="requestsCountWrapper"><span id="requestsCountValue">0</span><i class="accessible_elem"> Requests</i></span></a><div class="jewelFlyout fbJewelFlyout toggleTargetClosed  uiToggleFlyout" id="fbRequestsFlyout"><div class="jewelBeeperHeader"><div class="beeperNubWrapper"><div class="beeperNub"></div></div></div><ul class="jewelItemList" id="fbRequestsList"><li id="fbRequestsList_loading_indicator"><img class="jewelLoading img" src="http://static.ak.fbcdn.net/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif" alt="" width="16" height="11" /></li></ul></div></div><div class="fbJewel" id="fbMessagesJewel"><a class="jewelButton" rel="toggle" href="#" role="button" aria-labelledby="mercurymessagesCountWrapper" name="mercurymessages" data-gt="&#123;&quot;ua_id&quot;:&quot;jewel:mercurymessages&quot;&#125;" data-target="fbMessagesFlyout" aria-haspopup="true" aria-owns="fbMessagesFlyout"><span class="jewelCount" id="mercurymessagesCountWrapper"><span id="mercurymessagesCountValue">0</span><i class="accessible_elem"> Messages</i></span></a><div class="jewelFlyout fbJewelFlyout toggleTargetClosed  uiToggleFlyout" id="fbMessagesFlyout"><div class="jewelBeeperHeader"><div 

PS thanks to Facebook for the source code.
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
post #2 of 3
The best I've seen for JS:
Dojo ShrinkSafe: http://shrinksafe.dojotoolkit.org/

It doesn't do obfuscation, that is pointless IMO.

For HTML, when I did web dev I used to write my own. Simply stripping new lines was good enough.
For CSS I think I used to use this: http://www.cssdrive.com/index.php/main/csscompressor/
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 64GB 1333MHz 4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 
Optical DriveOSPowerCase
2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 64GB 1333MHz 4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 
Optical DriveOSPowerCase
2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by tompsonn View Post

The best I've seen for JS:
Dojo ShrinkSafe: http://shrinksafe.dojotoolkit.org/
It doesn't do obfuscation, that is pointless IMO.
For HTML, when I did web dev I used to write my own. Simply stripping new lines was good enough.
For CSS I think I used to use this: http://www.cssdrive.com/index.php/main/csscompressor/

I looked into those and they look pretty solid. Thanks

Josh
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
Main Rig.
(14 items)
 
Battlefield 2 review.
Battlefield 2 PC Game EA
 
CPUMotherboardGraphicsRAM
Bulldozer FX4100 Gigabyte GA-M68MT-S2 MSI 7770 Kingston Hyper X | 2 x 2 GB 
Hard DriveOptical DriveCoolingOS
WD 2 TB  LiteON DVD/CD R-W Drive AMD Standard cooler Windows 7 Ultimate 
MonitorKeyboardPowerCase
32' Luxor Full HD TV Microsoft comfort curce Antec 450 Watt OcUK Value case 
MouseAudio
Microsoft wireless mouse Logitech speakers & Bass 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding