Re-implement freedom.min.js. Close #160