diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-12-29 15:42:48 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-10 12:30:40 -0600 |
commit | 7c47cc94c5d7425583db3610c85cb150df601a91 (patch) | |
tree | 2544c6ac133e4abba79dcacb2a10df24e79224d6 /vendor/assets | |
parent | 3eb8569778ce2559eedab706f6f901238e39b355 (diff) | |
download | gitlab-ce-7c47cc94c5d7425583db3610c85cb150df601a91.tar.gz |
Swapped out teaspoon for karma
Diffstat (limited to 'vendor/assets')
-rw-r--r-- | vendor/assets/javascripts/jquery.turbolinks.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/vendor/assets/javascripts/jquery.turbolinks.js b/vendor/assets/javascripts/jquery.turbolinks.js index fd6e95e75d5..0cf3fc7cf7a 100644 --- a/vendor/assets/javascripts/jquery.turbolinks.js +++ b/vendor/assets/javascripts/jquery.turbolinks.js @@ -8,10 +8,23 @@ The MIT License Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz */ -(function() { +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define(["jquery"], function (a0) { + return (factory(a0)); + }); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require("jquery")); + } else { + factory(jQuery); + } +}(this, function($) { var $, $document; - - $ = window.jQuery || (typeof require === "function" ? require('jquery') : void 0); + $ = $ || window.jQuery || (typeof require === "function" ? require('jquery') : void 0); $document = $(document); @@ -46,4 +59,4 @@ Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz $.turbo.use('page:load', 'page:fetch'); -}).call(this); +})); |