'use strict';
const jsdom = require('jsdom');
module.exports = function(url, callback) {
  jsdom.env(
    url,
    ['http://code.jquery.com/jquery.js'],
    function (err, window) {
      if (err) {
        return callback(err);
      }
      // Get the last link on the page.
      let link = window.$('a').last()[0].href;
      // Check that it is tgz.
      if (!link.indexOf('tgz')) {
        callback(new Error('No archive found.'));
      }
      else {
        callback(null, link);
      }
    }
  );
};

@@ -362,9 +362,8 @@
 if (
-!
 link
@@ -377,16 +377,20 @@
 f('tgz')
+ %3C 0
 ) %7B%0A    

Fix a bug in findArchive.