PoC for breaking jQuery by minification
JavaScript HTML Other
Pull request Compare This branch is 577 commits ahead, 1331 commits behind jquery:master.
Latest commit af49b42 Aug 24, 2015 yan README: include link to blog
Failed to load latest commit information.
build Release: Remove copying of jquery-latest files Jan 7, 2015
dist Dist: Update dist with uglify-js@2.4.23 Aug 23, 2015
html HTML: Add PoC HTML files Aug 23, 2015
src Manipulation: subtle change to innerHTML replacement Aug 23, 2015
test Core: add workaround for iOS JIT error in isArrayLike Apr 15, 2015
.bowerrc Explicitly set bower folder location Aug 27, 2013
.editorconfig Update .editorconfig with new properties. Close gh-915. Sep 10, 2012
.gitattributes Build: change .gitattributes; use system line ends for non-JS files Apr 4, 2014
.gitignore Build: Use absolute paths in .gitignore and .npmignore. Dec 18, 2013
.jscsrc Build: Spaces vs tabs Apr 24, 2014
.jshintignore Manage bower dependencies with grunt-bowercopy Dec 6, 2013
.jshintrc Update jshintrc to conform to new style guide. Conform to onevar and … Apr 9, 2013
.mailmap Authors: Update AUTHORS.txt and .mailmap Dec 17, 2014
.npmignore Build: Don't publish dist/cdn to npm/Bower Mar 25, 2015
.travis.yml Use grunt and bower packages as local dependencies. Close gh-1433. Nov 14, 2013
AUTHORS.txt Authors: Update AUTHORS.txt and .mailmap Dec 17, 2014
CONTRIBUTING.md Docs: Link to the browser support page in CONTRIBUTING.md Jan 6, 2014
Gruntfile.js Ajax: move ajax event aliases to their own file Jun 2, 2014
MIT-LICENSE.txt Build: Happy New Year! Thanks @marlonlandaverde Jan 10, 2014
README.md README: include link to blog Aug 24, 2015
bower.json 1.11.3 Apr 28, 2015
package.json 1.11.3 Apr 28, 2015


What is this?

This is a fork of jQuery 1.11.3 that only breaks when built with a particular version of the minifier (uglify-js@2.4.23, possibly earlier versions though I haven't checked). It was used to make the PoC described in this blog post.

./html includes HTML files that behave differently in "interesting" ways depending on whether the included jquery script is minified.

Building a non-broken build

$ npm install
$ grunt

Building a broken build

$ npm install

Open node_modules/grunt-contrib-uglify/package.json and set "uglify-js": "2.4.23" in the "dependencies" field. Then to force grunt-contrib-uglify to install this particular version of uglify-js:

$ cd node_modules/grunt-contrib-uglify
$ rm -r node_modules
$ npm install
$ cd ../..
$ grunt