[Pkg-javascript-commits] [backbone] 109/211: ender.js support

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:00:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit 94edc63f2072407b257614e8dba84bdcd1e58f99
Author: Vladimir Dronnikov <dronnikov at gmail.com>
Date:   Fri Apr 15 21:25:38 2011 +0400

    ender.js support
---
 backbone.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/backbone.js b/backbone.js
index ed88feb..eccf12a 100644
--- a/backbone.js
+++ b/backbone.js
@@ -28,11 +28,11 @@
   Backbone.VERSION = '0.3.3';
 
   // Require Underscore, if we're on the server, and it's not already present.
-  var _ = root._;
+  var _ = root.$ && root.$.ender ? root.$ : root._;
   if (!_ && (typeof require !== 'undefined')) _ = require('underscore')._;
 
   // For Backbone's purposes, either jQuery or Zepto owns the `$` variable.
-  var $ = root.jQuery || root.Zepto;
+  var $ = root.$ && root.$.ender ? root.$ : (root.jQuery || root.Zepto);
 
   // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
   // to its previous owner. Returns a reference to this Backbone object.
@@ -753,7 +753,7 @@
     start : function() {
       if (historyStarted) throw new Error("Backbone.history has already been started");
       var docMode = document.documentMode;
-      var oldIE = ($.browser.msie && (!docMode || docMode <= 7));
+      var oldIE = (navigator.userAgent.toLowerCase().match(/msie [\w.]+/) && (!docMode || docMode <= 7));
       if (oldIE) {
         this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
       }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list