Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

set tabstop=4
set shiftwidth=4
set expandtab
30 changes: 30 additions & 0 deletions GruntFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['Gruntfile.js', 'lib/jqq.js', 'tests/specs/*.js']
},
jasmine: {
components: {
src: ['lib/jqq.js'],
options: {
vendor: ['http://code.jquery.com/jquery-1.7.2.js'],
specs: 'tests/specs/*Spec.js'
}
}
}
});


// Load the plugin that provides the "jasmine" task.
grunt.loadNpmTasks('grunt-contrib-jasmine');

// Default task(s).
grunt.registerTask('default', ['jasmine' ]);

// Travis task(s).
grunt.registerTask('travis', ['jasmine']);

};
15 changes: 12 additions & 3 deletions lib/jqq.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,25 @@ if(typeof window.jQQ !== 'object'){
setup: function(version) {
// wait for document to load...
if(!document.body) return window.onload = function(){ window.jQQ.setup(version) };
var url = '//ajax.googleapis.com/ajax/libs/jquery/'+(version||'1.4.2')+'/jquery.min.js';

var useSSL = 'https:' === document.location.protocol;
var url = (useSSL ? 'https:' : 'http:') + '//ajax.googleapis.com/ajax/libs/jquery/'+(version||'1.4.2')+'/jquery.min.js';

loadScript( url , function() {
window.jQQ.isReady = true;

// this stores the new version and gives back the old one, completely.
jq = jQuery.noConflict(true);
callbacks.forEach(window.jQQ.isolate);

var callback;
for(var i = 0; i < callbacks.length; i++) {
callback = callbacks[i];
window.jQQ.isolate(callback);
}
delete(callbacks);

});
}
};
})(window.jQuery,window.$)
}
}
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "jQuery-Quarantine",
"version": "0.0.1",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jasmine": "~0.5.1"
},
"scripts": {
"test": "grunt travis --verbose"
}
}
20 changes: 20 additions & 0 deletions tests/lib/jasmine-1.3.1/MIT.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2008-2011 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading