Moved old jquery recognition to seperate file

This commit is contained in:
Peter 'Pita' Martischka 2013-02-10 20:34:27 +00:00
parent 60de52477c
commit 5e041aaedb
3 changed files with 51 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
@ -34,18 +34,6 @@ function object(o)
return new f();
}
var userAgent = (((function () {return this;})().navigator || {}).userAgent || 'node-js').toLowerCase();
var browser = {
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
safari: /webkit/.test(userAgent),
opera: /opera/.test(userAgent),
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent),
windows: /windows/.test(userAgent),
mobile: /mobile/.test(userAgent) || /android/.test(userAgent)
};
function getAssoc(obj, name)
{
return obj["_magicdom_" + name];
@ -96,7 +84,6 @@ var noop = function(){};
exports.isNodeText = isNodeText;
exports.object = object;
exports.browser = browser;
exports.getAssoc = getAssoc;
exports.setAssoc = setAssoc;
exports.binarySearch = binarySearch;