Skip to content
Snippets Groups Projects
Select Git revision
  • cd94e8e2047aef0d8d1c0aed070be8d813821cc3
  • main default protected
2 results

downloadImg.js

Blame
  • backbone.js 59.57 KiB
    //     Backbone.js 1.1.2
    
    //     (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
    //     Backbone may be freely distributed under the MIT license.
    //     For all details and documentation:
    //     http://backbonejs.org
    
    (function(root, factory) {
    
      // Set up Backbone appropriately for the environment. Start with AMD.
      if (typeof define === 'function' && define.amd) {
        define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
          // Export global even in AMD case in case this script is loaded with
          // others that may still expect a global Backbone.
          root.Backbone = factory(root, exports, _, $);
        });
    
      // Next for Node.js or CommonJS. jQuery may not be needed as a module.
      } else if (typeof exports !== 'undefined') {
        var _ = require('underscore');
        factory(root, exports, _);
    
      // Finally, as a browser global.
      } else {
        root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
      }
    
    }(this, function(root, Backbone, _, $) {
    
      // Initial Setup
      // -------------
    
      // Save the previous value of the `Backbone` variable, so that it can be
      // restored later on, if `noConflict` is used.
      var previousBackbone = root.Backbone;
    
      // Create local references to array methods we'll want to use later.
      var array = [];
      var push = array.push;
      var slice = array.slice;
      var splice = array.splice;
    
      // Current version of the library. Keep in sync with `package.json`.
      Backbone.VERSION = '1.1.2';
    
      // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
      // the `$` variable.
      Backbone.$ = $;
    
      // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
      // to its previous owner. Returns a reference to this Backbone object.
      Backbone.noConflict = function() {
        root.Backbone = previousBackbone;
        return this;
      };
    
      // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
      // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
      // set a `X-Http-Method-Override` header.
      Backbone.emulateHTTP = false;
    
      // Turn on `emulateJSON` to support legacy servers that can't deal with direct
      // `application/json` requests ... will encode the body as
      // `application/x-www-form-urlencoded` instead and will send the model in a
      // form param named `model`.
      Backbone.emulateJSON = false;
    
      // Backbone.Events
      // ---------------