mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-23 22:12:30 -05:00
9f8d608a8d
- Mark all exported vars - Mark redefined global vars - Suppress leak warning for the redefinition of jQuery
33 lines
919 B
JavaScript
33 lines
919 B
JavaScript
/*global Element:true, document:true, window:true, $:true, jQuery:true */
|
|
/*exported precompileEmberHandlebars, $, jQuery */
|
|
// DOM
|
|
var Element = {};
|
|
Element.firstChild = function () { return Element; };
|
|
Element.innerHTML = function () { return Element; };
|
|
|
|
var document = { createRange: false, createElement: function() { return Element; } };
|
|
var window = this;
|
|
this.document = document;
|
|
|
|
// Console
|
|
var console = window.console = {};
|
|
console.log = console.info = console.warn = console.error = function(){};
|
|
|
|
/*jshint -W120 */
|
|
// jQuery
|
|
var $ = jQuery = window.jQuery = function() { return jQuery; };
|
|
/*jshint +W120*/
|
|
jQuery.ready = function() { return jQuery; };
|
|
jQuery.inArray = function() { return jQuery; };
|
|
jQuery.event = {
|
|
fixHooks: function() {
|
|
}
|
|
};
|
|
|
|
jQuery.jquery = "1.7.2";
|
|
var $ = jQuery;
|
|
|
|
// Ember
|
|
function precompileEmberHandlebars(string) {
|
|
return Ember.Handlebars.precompile(string).toString();
|
|
}
|