From: Jason Guiditta <jguiditt(a)redhat.com>
---
src/public/javascripts/jquery.cookie.js | 92 ---
src/public/javascripts/jquery.flash.js | 288 ---------
src/public/javascripts/jquery.html5form.js | 259 --------
src/public/javascripts/jquery.loadmask.min.js | 10 -
src/public/javascripts/jquery.timers.js | 142 -----
src/public/javascripts/modernizr-1.5.js | 807 -------------------------
6 files changed, 0 insertions(+), 1598 deletions(-)
delete mode 100644 src/public/javascripts/jquery.cookie.js
delete mode 100644 src/public/javascripts/jquery.flash.js
delete mode 100644 src/public/javascripts/jquery.html5form.js
delete mode 100644 src/public/javascripts/jquery.loadmask.min.js
delete mode 100644 src/public/javascripts/jquery.timers.js
delete mode 100644 src/public/javascripts/modernizr-1.5.js
diff --git a/src/public/javascripts/jquery.cookie.js
b/src/public/javascripts/jquery.cookie.js
deleted file mode 100644
index 8e8e1d9..0000000
--- a/src/public/javascripts/jquery.cookie.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- *
http://www.opensource.org/licenses/mit-license.php
- *
http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', {expires: 7, path:
'/', domain: 'jquery.com', secure: true});
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional
cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now
on in days or a Date object.
- * If a negative value is specified (e.g. a date in the
past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session
cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of
page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain
of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the
cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl(a)stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl(a)stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' ||
options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires
attribute, max-age is not supported by IE
- }
- var path = options.path ? '; path=' + options.path : '';
- var domain = options.domain ? '; domain=' + options.domain : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path,
domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
\ No newline at end of file
diff --git a/src/public/javascripts/jquery.flash.js
b/src/public/javascripts/jquery.flash.js
deleted file mode 100644
index 2608834..0000000
--- a/src/public/javascripts/jquery.flash.js
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- * Flash (
http://jquery.lukelutman.com/plugins/flash)
- * A jQuery plugin for embedding Flash movies.
- *
- * Version 1.0
- * November 9th, 2006
- *
- * Copyright (c) 2006 Luke Lutman (
http://www.lukelutman.com)
- * Dual licensed under the MIT and GPL licenses.
- *
http://www.opensource.org/licenses/mit-license.php
- *
http://www.opensource.org/licenses/gpl-license.php
- *
- * Inspired by:
- * SWFObject (
http://blog.deconcept.com/swfobject/)
- * UFO (
http://www.bobbyvandersluis.com/ufo/)
- * sIFR (
http://www.mikeindustries.com/sifr/)
- *
- * IMPORTANT:
- * The packed version of jQuery breaks ActiveX control
- * activation in Internet Explorer. Use JSMin to minifiy
- * jQuery (see:
http://jquery.lukelutman.com/plugins/flash#activex).
- *
- **/
-;(function(){
-
-var $$;
-
-/**
- *
- * @desc Replace matching elements with a flash movie.
- * @author Luke Lutman
- * @version 1.0.1
- *
- * @name flash
- * @param Hash htmlOptions Options for the embed/object tag.
- * @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
- * @param Function replace Custom block called for each matched element if flash is
installed (optional).
- * @param Function update Custom block called for each matched if flash isn't
installed (optional).
- * @type jQuery
- *
- * @cat plugins/flash
- *
- * @example $('#hello').flash({ src: 'hello.swf' });
- * @desc Embed a Flash movie.
- *
- * @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
- * @desc Embed a Flash 8 movie.
- *
- * @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall:
true });
- * @desc Embed a Flash movie using Express Install if flash isn't installed.
- *
- * @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
- * @desc Embed a Flash movie, don't show an update message if Flash isn't
installed.
- *
-**/
-$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
-
- // Set the default block.
- var block = replace || $$.replace;
-
- // Merge the default and passed plugin options.
- pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
-
- // Detect Flash.
- if(!$$.hasFlash(pluginOptions.version)) {
- // Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
- if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
- // Add the necessary flashvars (merged later).
- var expressInstallOptions = {
- flashvars: {
- MMredirectURL: location,
- MMplayerType: 'PlugIn',
- MMdoctitle: jQuery('title').text()
- }
- };
- // Ask the user to update (if specified).
- } else if (pluginOptions.update) {
- // Change the block to insert the update message instead of the flash movie.
- block = update || $$.update;
- // Fail
- } else {
- // The required version of flash isn't installed.
- // Express Install is turned off, or flash 6,0,65 isn't installed.
- // Update is turned off.
- // Return without doing anything.
- return this;
- }
- }
-
- // Merge the default, express install and passed html options.
- htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
-
- // Invoke $block (with a copy of the merged html options) for each element.
- return this.each(function(){
- block.call(this, $$.copy(htmlOptions));
- });
-
-};
-/**
- *
- * @name flash.copy
- * @desc Copy an arbitrary number of objects into a new object.
- * @type Object
- *
- * @example $$.copy({ foo: 1 }, { bar: 2 });
- * @result { foo: 1, bar: 2 };
- *
-**/
-$$.copy = function() {
- var options = {}, flashvars = {};
- for(var i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if(arg == undefined) continue;
- jQuery.extend(options, arg);
- // don't clobber one flash vars object with another
- // merge them instead
- if(arg.flashvars == undefined) continue;
- jQuery.extend(flashvars, arg.flashvars);
- }
- options.flashvars = flashvars;
- return options;
-};
-/*
- * @name flash.hasFlash
- * @desc Check if a specific version of the Flash plugin is installed
- * @type Boolean
- *
-**/
-$$.hasFlash = function() {
- // look for a flag in the query string to bypass flash detection
- if(/hasFlash\=true/.test(location)) return true;
- if(/hasFlash\=false/.test(location)) return false;
- var pv = $$.hasFlash.playerVersion().match(/\d+/g);
- var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) ||
String($$.pluginOptions.version).match(/\d+/g);
- for(var i = 0; i < 3; i++) {
- pv[i] = parseInt(pv[i] || 0);
- rv[i] = parseInt(rv[i] || 0);
- // player is less than required
- if(pv[i] < rv[i]) return false;
- // player is greater than required
- if(pv[i] > rv[i]) return true;
- }
- // major version, minor version and revision match exactly
- return true;
-};
-/**
- *
- * @name flash.hasFlash.playerVersion
- * @desc Get the version of the installed Flash plugin.
- * @type String
- *
-**/
-$$.hasFlash.playerVersion = function() {
- // ie
- try {
- try {
- // avoid fp6 minor version lookup issues
- // see:
http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-intern...
- var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
- try { axo.AllowScriptAccess = 'always'; }
- catch(e) { return '6,0,0'; }
- } catch(e) {}
- return new
ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,
',').match(/^,?(.+),?$/)[1];
- // other browsers
- } catch(e) {
- try {
- if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
- return (navigator.plugins["Shockwave Flash 2.0"] ||
navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,
",").match(/^,?(.+),?$/)[1];
- }
- } catch(e) {}
- }
- return '0,0,0';
-};
-/**
- *
- * @name flash.htmlOptions
- * @desc The default set of options for the object or embed tag.
- *
-**/
-$$.htmlOptions = {
- height: 240,
- flashvars: {},
- pluginspage: 'http://www.adobe.com/go/getflashplayer',
- src: '#',
- type: 'application/x-shockwave-flash',
- width: 320
-};
-/**
- *
- * @name flash.pluginOptions
- * @desc The default set of options for checking/updating the flash Plugin.
- *
-**/
-$$.pluginOptions = {
- expressInstall: false,
- update: true,
- version: '6.0.65'
-};
-/**
- *
- * @name flash.replace
- * @desc The default method for replacing an element with a Flash movie.
- *
-**/
-$$.replace = function(htmlOptions) {
- this.innerHTML = '<div
class="alt">'+this.innerHTML+'</div>';
- jQuery(this)
- .addClass('flash-replaced')
- .prepend($$.transform(htmlOptions));
-};
-/**
- *
- * @name flash.update
- * @desc The default method for replacing an element with an update message.
- *
-**/
-$$.update = function(htmlOptions) {
- var url = String(location).split('?');
- url.splice(1,0,'?hasFlash=true&');
- url = url.join('');
- var msg = '<p>This content requires the Flash Player. <a
href="http://www.adobe.com/go/getflashplayer">Download Flash
Player</a>. Already have Flash Player? <a
href="'+url+'">Click here.</a></p>';
- this.innerHTML = '<span
class="alt">'+this.innerHTML+'</span>';
- jQuery(this)
- .addClass('flash-update')
- .prepend(msg);
-};
-/**
- *
- * @desc Convert a hash of html options to a string of attributes, using
Function.apply().
- * @example toAttributeString.apply(htmlOptions)
- * @result foo="bar" foo="bar"
- *
-**/
-function toAttributeString() {
- var s = '';
- for(var key in this)
- if(typeof this[key] != 'function')
- s += key+'="'+this[key]+'" ';
- return s;
-};
-/**
- *
- * @desc Convert a hash of flashvars to a url-encoded string, using Function.apply().
- * @example toFlashvarsString.apply(flashvarsObject)
- * @result foo=bar&foo=bar
- *
-**/
-function toFlashvarsString() {
- var s = '';
- for(var key in this)
- if(typeof this[key] != 'function')
- s += key+'='+encodeURIComponent(this[key])+'&';
- return s.replace(/&$/, '');
-};
-/**
- *
- * @name flash.transform
- * @desc Transform a set of html options into an embed tag.
- * @type String
- *
- * @example $$.transform(htmlOptions)
- * @result <embed src="foo.swf" ... />
- *
- * Note: The embed tag is NOT standards-compliant, but it
- * works in all current browsers. flash.transform can be
- * overwritten with a custom function to generate more
- * standards-compliant markup.
- *
-**/
-$$.transform = function(htmlOptions) {
- htmlOptions.toString = toAttributeString;
- if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
- return '<embed ' + String(htmlOptions) + '/>';
-};
-
-/**
- *
- * Flash Player 9 Fix (
http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
- *
-**/
-if (window.attachEvent) {
- window.attachEvent("onbeforeunload", function(){
- __flash_unloadHandler = function() {};
- __flash_savedUnloadHandler = function() {};
- });
-}
-
-})();
\ No newline at end of file
diff --git a/src/public/javascripts/jquery.html5form.js
b/src/public/javascripts/jquery.html5form.js
deleted file mode 100644
index 9b54227..0000000
--- a/src/public/javascripts/jquery.html5form.js
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Html5 Form Plugin - jQuery plugin
- * HTML5 form Validation form Internet Explorer & Firefox
- * Version 1.1 / English
- *
- * written by Matias Mancini
- *
http://www.matiasmancini.com.ar/html5form_en.php
- *
- * Copyright (c) 2010 Matias Mancini (
http://www.matiasmancini.com.ar)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * Built for jQuery library
- *
http://jquery.com
- *
- */
-(function($){
- $.fn.html5form = function(options){
-
- $(this).each(function(){
-
- //default configuration properties
- var defaults = {
- async : true,
- method : $(this).attr('method'),
- responseDiv : null,
- labels : 'show',
- colorOn : '#000000',
- colorOff : '#a1a1a1',
- action : $(this).attr('action'),
- messages : false,
- emptyMessage : false,
- emailMessage : false,
- allBrowsers : false
- };
- var opts = $.extend({}, defaults, options);
-
- //Filters latest WebKit versions only
- if(!opts.allBrowsers){
- if($.browser.webkit && parseInt($.browser.version)>=533){
- return false;
- }
- }
-
- //Private properties
- var form = $(this);
- var required = new Array();
- var email = new Array();
-
- //Setup color & placeholder function
- function fillInput(input){
- input.val(input.attr('placeholder'));
- input.css('color', opts.colorOff);
- }
-
- //Label hiding (if required)
- if(opts.labels=='hide'){
- $(this).find('label').hide();
- }
-
- //Select event handler (just colors)
- $.each($('select', this), function(){
- $(this).css('color', opts.colorOff);
- $(this).change(function(){
- $(this).css('color', opts.colorOn);
- });
- });
-
- //For each textarea & visible input excluding button, submit, radio,
checkbox and select
- $.each($(':input:visible:not(:button, :submit, :radio, :checkbox,
select)', form), function(i) {
-
- //Setting color & placeholder
- fillInput($(this));
-
- //Make array of required inputs
- if($.browser.webkit || $.browser.opera){
- if($(this).attr('required')){
- required[i]=$(this);
- }
- }
- else{
- if($(this).attr('required')==''){
- required[i]=$(this);
- }
- }
-
- //Make array of Email inputs
- $('input').filter(this).each(function(){
- if(this.getAttribute('type')=='email'){
- email[i]=$(this);
- }
- });
-
- //FOCUS event attach
- //If input value == placeholder attribute will clear the field
- //If input type == url will not
- //In both cases will change the color with colorOn property
- $(this).bind('focus', function(ev){
- ev.preventDefault();
- if(this.value == $(this).attr('placeholder')){
- if(this.getAttribute('type')!='url'){
- $(this).attr('value', '');
- }
- }
- $(this).css('color', opts.colorOn);
- });
-
- //BLUR event attach
- //If input value == empty calls fillInput fn
- //if input type == url and value == placeholder attribute calls fn too
- $(this).bind('blur', function(ev){
- ev.preventDefault();
- if(this.value == ''){
- fillInput($(this));
- }
- else{
- if((this.getAttribute('type')=='url') &&
($(this).val()==$(this).attr('placeholder'))){
- fillInput($(this));
- }
- }
- });
-
- //Limits content typing to TEXTAREA type fields according to attribute
maxlength
- $('textarea').filter(this).each(function(){
- if($(this).attr('maxlength')>0){
- $(this).keypress(function(ev){
- var cc = ev.charCode || ev.keyCode;
- if(cc == 37 || cc == 39) {
- return true;
- }
- if(cc == 8 || cc == 46) {
- return true;
- }
- if(this.value.length >=
$(this).attr('maxlength')){
- return false;
- }
- else{
- return true;
- }
- });
- }
- });
- });
- $.each($(':submit', this), function() {
- $(this).bind('click', function(ev){
-
- var emptyInput=null;
- var emailError=null;
- var input = $(':input:visible:not(:button, :submit, :radio,
:checkbox, select)', form);
-
- //Search for empty fields & value same as placeholder
- //returns first input founded
- //Add messages for English, Spanish and Italian Messages
- $(required).each(function(key, value) {
- if(value==undefined){
- return true;
- }
- if(($(this).val()==$(this).attr('placeholder')) ||
($(this).val()=='')){
- emptyInput=$(this);
- if(opts.emptyMessage){
- //Customized empty message
-
$(opts.responseDiv).html('<p>'+opts.emptyMessage+'</p>');
- }
- else if(opts.messages=='es'){
- //Spanish empty message
- $(opts.responseDiv).html('<p>El campo
'+$(this).attr('title')+' es requerido.</p>');
- }
- else if(opts.messages=='en'){
- //English empty message
- $(opts.responseDiv).html('<p>The
'+$(this).attr('title')+' field is required.</p>');
- }
- else if(opts.messages=='it'){
- //Italian empty message
- $(opts.responseDiv).html('<p>Il campo
'+$(this).attr('title')+' é richiesto.</p>');
- }
- return false;
- }
- return emptyInput;
- });
-
- //check email type inputs with regular expression
- //return first input founded
- $(email).each(function(key, value) {
- if(value==undefined){
- return true;
- }
-
if($(this).val().search(/[\w-\.]{3,}(a)([\w-]{2,}\.)*([\w-]{2,}\.)[\w-]{2,4}/i)){
- emailError=$(this);
- return false;
- }
- return emailError;
- });
-
- //Submit form ONLY if emptyInput & emailError are null
- //if async property is set to false, skip ajax
- if(!emptyInput && !emailError){
-
- //Clear all empty value fields before Submit
- $(input).each(function(){
- if($(this).val()==$(this).attr('placeholder')){
- $(this).val('');
- }
- });
- //Submit data by Ajax
- if(opts.async){
- var formData=$(form).serialize();
- $.ajax({
- url : opts.action,
- type : opts.method,
- data : formData,
- success : function(data){
- if(opts.responseDiv){
- $(opts.responseDiv).html(data);
- }
- //Reset form
- $(input).val('');
- $.each(form[0], function(){
- fillInput($(this).not(':hidden, :button,
:submit, :radio, :checkbox, select'));
- $('select', form).each(function(){
- $(this).css('color', opts.colorOff);
-
$(this).children('option:eq(0)').attr('selected', 'selected');
- });
- $(':radio, :checkbox',
form).removeAttr('checked');
- });
- }
- });
- }
- else{
- $(form).submit();
- }
- }else{
- if(emptyInput){
- $(emptyInput).focus().select();
- }
- else if(emailError){
- //Customized email error messages (Spanish, English,
Italian)
- if(opts.emailMessage){
-
$(opts.responseDiv).html('<p>'+opts.emailMessage+'</p>');
- }
- else if(opts.messages=='es'){
- $(opts.responseDiv).html('<p>Ingrese una
dirección de correo válida por favor.</p>');
- }
- else if(opts.messages=='en'){
- $(opts.responseDiv).html('<p>Please type a
valid email address.</p>');
- }
- else if(opts.messages=='it'){
- $(opts.responseDiv).html("<p>L'indirizzo
e-mail non é valido.</p>");
- }
- $(emailError).select();
- }else{
- alert('Unknown Error');
- }
- }
- return false;
- });
- });
- });
- }
-})(jQuery);
diff --git a/src/public/javascripts/jquery.loadmask.min.js
b/src/public/javascripts/jquery.loadmask.min.js
deleted file mode 100644
index 8581728..0000000
--- a/src/public/javascripts/jquery.loadmask.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Copyright (c) 2009 Sergiy Kovalchuk (serg472(a)gmail.com)
- *
- * Dual licensed under the MIT (
http://www.opensource.org/licenses/mit-license.php)
- * and GPL (
http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * Following code is based on Element.mask() implementation from ExtJS framework
(
http://extjs.com/)
- *
- */
-(function(a){a.fn.mask=function(c,b){a(this).each(function(){if(b!==undefined&&b>0){var
d=a(this);d.data("_mask_timeout",setTimeout(function(){a.maskElement(d,c)},b))}else{a.maskElement(a(this),c)}})};a.fn.unmask=function(){a(this).each(function(){a.unmaskElement(a(this))})};a.fn.isMasked=function(){return
this.hasClass("masked")};a.maskElement=function(d,c){if(d.data("_mask_timeout")!==undefined){clearTimeout(d.data("_mask_timeout"));d.removeData("_mask_timeout")}if(d.isMasked()){a.unmaskElement(d)}if(d.css("position")=="static"){d.addClass("masked-relative")}d.addClass("masked");var
e=a('<div
class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){e.height(d.height()+parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom")));e.width(d.width()+parseInt(d.css("padding-left"))+parseInt(d.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie
6")>-1){d.find("select").addClass("masked-hidden")}d.append(e);if(c!==undefined){v!
ar b=a('<div class="loadmask-msg"
style="display:none;"></div>');b.append("<div>"+c+"</div>");d.append(b);b.css("top",Math.round(d.height()/2-(b.height()-parseInt(b.css("padding-top"))-parseInt(b.css("padding-bottom")))/2)+"px");b.css("left",Math.round(d.width()/2-(b.width()-parseInt(b.css("padding-left"))-parseInt(b.css("padding-right")))/2)+"px");b.show()}};a.unmaskElement=function(b){if(b.data("_mask_timeout")!==undefined){clearTimeout(b.data("_mask_timeout"));b.removeData("_mask_timeout")}b.find(".loadmask-msg,.loadmask").remove();b.removeClass("masked");b.removeClass("masked-relative");b.find("select").removeClass("masked-hidden")}})(jQuery);
diff --git a/src/public/javascripts/jquery.timers.js
b/src/public/javascripts/jquery.timers.js
deleted file mode 100644
index 406de7e..0000000
--- a/src/public/javascripts/jquery.timers.js
+++ /dev/null
@@ -1,142 +0,0 @@
-jQuery.fn.extend({
- everyTime: function(interval, label, fn, times, belay) {
- return this.each(function() {
- jQuery.timer.add(this, interval, label, fn, times, belay);
- });
- },
- oneTime: function(interval, label, fn) {
- return this.each(function() {
- jQuery.timer.add(this, interval, label, fn, 1);
- });
- },
- stopTime: function(label, fn) {
- return this.each(function() {
- jQuery.timer.remove(this, label, fn);
- });
- }
-});
-
-jQuery.extend({
- timer: {
- guid: 1,
- global: {},
- regex: /^([0-9]+)\s*(.*s)?$/,
- powers: {
- // Yeah this is major overkill...
- 'ms': 1,
- 'cs': 10,
- 'ds': 100,
- 's': 1000,
- 'das': 10000,
- 'hs': 100000,
- 'ks': 1000000
- },
- timeParse: function(value) {
- if (value == undefined || value == null)
- return null;
- var result = this.regex.exec(jQuery.trim(value.toString()));
- if (result[2]) {
- var num = parseInt(result[1], 10);
- var mult = this.powers[result[2]] || 1;
- return num * mult;
- } else {
- return value;
- }
- },
- add: function(element, interval, label, fn, times, belay) {
- var counter = 0;
-
- if (jQuery.isFunction(label)) {
- if (!times)
- times = fn;
- fn = label;
- label = interval;
- }
-
- interval = jQuery.timer.timeParse(interval);
-
- if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
- return;
-
- if (times && times.constructor != Number) {
- belay = !!times;
- times = 0;
- }
-
- times = times || 0;
- belay = belay || false;
-
- if (!element.$timers)
- element.$timers = {};
-
- if (!element.$timers[label])
- element.$timers[label] = {};
-
- fn.$timerID = fn.$timerID || this.guid++;
-
- var handler = function() {
- if (belay && this.inProgress)
- return;
- this.inProgress = true;
- if ((++counter > times && times !== 0) || fn.call(element, counter) ===
false)
- jQuery.timer.remove(element, label, fn);
- this.inProgress = false;
- };
-
- handler.$timerID = fn.$timerID;
-
- if (!element.$timers[label][fn.$timerID])
- element.$timers[label][fn.$timerID] = window.setInterval(handler,interval);
-
- if ( !this.global[label] )
- this.global[label] = [];
- this.global[label].push( element );
-
- },
- remove: function(element, label, fn) {
- var timers = element.$timers, ret;
-
- if ( timers ) {
-
- if (!label) {
- for ( label in timers )
- this.remove(element, label, fn);
- } else if ( timers[label] ) {
- if ( fn ) {
- if ( fn.$timerID ) {
- window.clearInterval(timers[label][fn.$timerID]);
- delete timers[label][fn.$timerID];
- }
- } else {
- for ( var fn in timers[label] ) {
- window.clearInterval(timers[label][fn]);
- delete timers[label][fn];
- }
- }
-
- for ( ret in timers[label] ) break;
- if ( !ret ) {
- ret = null;
- delete timers[label];
- }
- }
-
- for ( ret in timers ) break;
- if ( !ret )
- element.$timers = null;
- }
- }
- }
-});
-
-if (jQuery.browser.msie)
- jQuery(window).one("unload", function() {
- var global = jQuery.timer.global;
- for ( var label in global ) {
- var els = global[label], i = els.length;
- while ( --i )
- jQuery.timer.remove(els[i], label);
- }
- });
-
-
diff --git a/src/public/javascripts/modernizr-1.5.js
b/src/public/javascripts/modernizr-1.5.js
deleted file mode 100644
index e41ebbc..0000000
--- a/src/public/javascripts/modernizr-1.5.js
+++ /dev/null
@@ -1,807 +0,0 @@
-/*!
- * Modernizr JavaScript library 1.5
- *
http://www.modernizr.com/
- *
- * Copyright (c) 2009-2010 Faruk Ates -
http://farukat.es/
- * Dual-licensed under the BSD and MIT licenses.
- *
http://www.modernizr.com/license/
- *
- * Featuring major contributions by
- * Paul Irish -
http://paulirish.com
- */
-
-/*
- * Modernizr is a script that will detect native CSS3 and HTML5 features
- * available in the current UA and provide an object containing all
- * features with a true/false value, depending on whether the UA has
- * native support for it or not.
- *
- * In addition to that, Modernizr will add classes to the <html>
- * element of the page, one for each cutting-edge feature. If the UA
- * supports it, a class like "cssgradients" will be added. If not,
- * the class name will be "no-cssgradients". This allows for simple
- * if-conditionals in CSS styling, making it easily to have fine
- * control over the look and feel of your website.
- *
- * @author Faruk Ates
- * @copyright (c) 2009-2010 Faruk Ates.
- *
- * @contributor Paul Irish
- * @contributor Ben Alman
- */
-
-window.Modernizr = (function(window,doc,undefined){
-
- var version = '1.5',
-
- ret = {},
-
- /**
- * enableHTML5 is a private property for advanced use only. If enabled,
- * it will make Modernizr.init() run through a brief while() loop in
- * which it will create all HTML5 elements in the DOM to allow for
- * styling them in Internet Explorer, which does not recognize any
- * non-HTML4 elements unless created in the DOM this way.
- *
- * enableHTML5 is ON by default.
- */
- enableHTML5 = true,
-
-
- /**
- * fontfaceCheckDelay is the ms delay before the @font-face test is
- * checked a second time. This is neccessary because both Gecko and
- * WebKit do not load data: URI font data synchronously.
- *
https://bugzilla.mozilla.org/show_bug.cgi?id=512566
- * The check will be done again at fontfaceCheckDelay*2 and then
- * a fourth time at window's load event.
- * If you need to query for @font-face support, send a callback to:
- * Modernizr._fontfaceready(fn);
- * The callback is passed the boolean value of Modernizr.fontface
- */
- fontfaceCheckDelay = 75,
-
-
- docElement = doc.documentElement,
-
- /**
- * Create our "modernizr" element that we do most feature tests on.
- */
- mod = 'modernizr',
- m = doc.createElement( mod ),
- m_style = m.style,
-
- /**
- * Create the input element for various Web Forms feature tests.
- */
- f = doc.createElement( 'input' ),
-
- // Reused strings, stored here to allow better minification
-
- canvas = 'canvas',
- canvastext = 'canvastext',
- rgba = 'rgba',
- hsla = 'hsla',
- multiplebgs = 'multiplebgs',
- backgroundsize = 'backgroundsize',
- borderimage = 'borderimage',
- borderradius = 'borderradius',
- boxshadow = 'boxshadow',
- opacity = 'opacity',
- cssanimations = 'cssanimations',
- csscolumns = 'csscolumns',
- cssgradients = 'cssgradients',
- cssreflections = 'cssreflections',
- csstransforms = 'csstransforms',
- csstransforms3d = 'csstransforms3d',
- csstransitions = 'csstransitions',
- fontface = 'fontface',
- geolocation = 'geolocation',
- video = 'video',
- audio = 'audio',
- input = 'input',
- inputtypes = input + 'types',
- // inputtypes is an object of its own containing individual tests for
- // various new input types, such as search, range, datetime, etc.
-
- svg = 'svg',
- smil = 'smil',
- svgclippaths = svg+'clippaths',
-
- background = 'background',
- backgroundColor = background + 'Color',
- canPlayType = 'canPlayType',
-
- // FF gets really angry if you name local variables as these, but camelCased.
- localstorage = 'localStorage',
- sessionstorage = 'sessionStorage',
- applicationcache = 'applicationCache',
-
- webWorkers = 'webworkers',
- hashchange = 'hashchange',
- crosswindowmessaging = 'crosswindowmessaging',
- historymanagement = 'historymanagement',
- draganddrop = 'draganddrop',
- websqldatabase = 'websqldatabase',
- indexedDB = 'indexedDB',
- websockets = 'websockets',
- smile = ':)',
-
- // IE7 gets mad if you name a local variable `toString`
- tostring = Object.prototype.toString,
-
- // list of property values to set for css tests. see ticket #21
- prefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
-
- tests = {},
- inputs = {},
- attrs = {},
-
- classes = [],
-
- /**
- * isEventSupported determines if a given element supports the given event
- * function from
http://yura.thinkweb2.com/isEventSupported/
- */
- isEventSupported = (function(){
-
- var TAGNAMES = {
- 'select':'input','change':'input',
- 'submit':'form','reset':'form',
-
'error':'img','load':'img','abort':'img'
- },
- cache = { };
-
- function isEventSupported(eventName, element) {
- var canCache = (arguments.length == 1);
-
- // only return cached result when no element is given
- if (canCache && cache[eventName]) {
- return cache[eventName];
- }
-
- element = element || document.createElement(TAGNAMES[eventName] ||
'div');
- eventName = 'on' + eventName;
-
- // When using `setAttribute`, IE skips "unload", WebKit skips
"unload" and "resize"
- // `in` "catches" those
- var isSupported = (eventName in element);
-
- if (!isSupported && element.setAttribute) {
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] == 'function';
- }
-
- element = null;
- return canCache ? (cache[eventName] = isSupported) : isSupported;
- }
-
- return isEventSupported;
- })();
-
-
- var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty;
- if (typeof _hasOwnProperty !== 'undefined' && typeof
_hasOwnProperty.call !== 'undefined') {
- hasOwnProperty = function (object, property) {
- return _hasOwnProperty.call(object, property);
- };
- }
- else {
- hasOwnProperty = function (object, property) { /* yes, this can give false
positives/negatives, but most of the time we don't care about those */
- return ((property in object) && typeof
object.constructor.prototype[property] === 'undefined');
- };
- }
-
- /**
- * set_css applies given styles to the Modernizr DOM node.
- */
- function set_css( str ) {
- m_style.cssText = str;
- }
-
- /**
- * set_css_all extrapolates all vendor-specific css strings.
- */
- function set_css_all( str1, str2 ) {
- return set_css(prefixes.join(str1 + ';') + ( str2 || '' ));
- }
-
- /**
- * contains returns a boolean for if substr is found within str.
- */
- function contains( str, substr ) {
- return (''+str).indexOf( substr ) !== -1;
- }
-
- /**
- * test_props is a generic CSS / DOM property test; if a browser supports
- * a certain property, it won't return undefined for it.
- * A supported CSS property returns empty string when its not yet set.
- */
- function test_props( props, callback ) {
- for ( var i in props ) {
- if ( m_style[ props[i] ] !== undefined && ( !callback || callback(
props[i], m ) ) ) {
- return true;
- }
- }
- }
-
- /**
- * test_props_all tests a list of DOM properties we want to check against.
- * We specify literally ALL possible (known and/or likely) properties on
- * the element including the non-vendor prefixed one, for forward-
- * compatibility.
- */
- function test_props_all( prop, callback ) {
- var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),
-
- // following spec is to expose vendor-specific style properties as:
- // elem.style.WebkitBorderRadius
- // and the following would be incorrect:
- // elem.style.webkitBorderRadius
- // Webkit and Mozilla are nice enough to ghost their properties in the lowercase
- // version but Opera does not.
-
- // see more here:
http://github.com/Modernizr/Modernizr/issues/issue/21
- props = [
- prop,
- 'Webkit' + uc_prop,
- 'Moz' + uc_prop,
- 'O' + uc_prop,
- 'ms' + uc_prop,
- 'Khtml' + uc_prop
- ];
-
- return !!test_props( props, callback );
- }
-
-
- /**
- * Tests
- */
-
- tests[canvas] = function() {
- return !!doc.createElement( canvas ).getContext;
- };
-
- tests[canvastext] = function() {
- return !!(tests[canvas]() && typeof doc.createElement( canvas
).getContext('2d').fillText == 'function');
- };
-
- /**
- * The Modernizr.touch test only indicates if the browser supports
- * touch events, which does not necessarily reflect a touchscreen
- * device, as evidenced by tablets running Windows 7 or, alas,
- * the Palm Pre / WebOS (touch) phones.
- * Additionally, chrome used to lie about its support on this, but that
- * has since been recitifed:
http://crbug.com/36415
- * Because there is no way to reliably detect Chrome's false positive
- * without UA sniffing we have removed this test from Modernizr. We
- * hope to add it in after Chrome 5 has been sunsetted.
- * See also
http://github.com/Modernizr/Modernizr/issues#issue/84
-
- tests[touch] = function() {
-
- return !!('ontouchstart' in window);
-
- };
- */
-
- /**
- * geolocation tests for the new Geolocation API specification.
- * This test is a standards compliant-only test; for more complete
- * testing, including a Google Gears fallback, please see:
- *
http://code.google.com/p/geo-location-javascript/
- * or view a fallback solution using google's geo API:
- *
http://gist.github.com/366184
- */
- tests[geolocation] = function() {
- return !!navigator.geolocation;
- };
-
- tests[crosswindowmessaging] = function() {
- return !!window.postMessage;
- };
-
- tests[websqldatabase] = function() {
- var result = !!window.openDatabase;
- if (result){
- try {
- result = !!openDatabase("testdb", "1.0", "html5 test
db", 200000);
- } catch(err) {
- result = false;
- }
- }
- return result;
- };
-
- tests[indexedDB] = function(){
- return !!window[indexedDB];
- };
-
- // documentMode logic from YUI to filter out IE8 Compat Mode
- // which false positives.
- tests[hashchange] = function() {
- return isEventSupported(hashchange, window) && ( document.documentMode ===
undefined || document.documentMode > 7 );
- };
-
- tests[historymanagement] = function() {
- return !!(window.history && history.pushState);
- };
-
- tests[draganddrop] = function() {
- return isEventSupported('drag')
- && isEventSupported('dragstart')
- && isEventSupported('dragenter')
- && isEventSupported('dragover')
- && isEventSupported('dragleave')
- && isEventSupported('dragend')
- && isEventSupported('drop');
- };
-
-
- tests[websockets] = function(){
- return ('WebSocket' in window);
- };
-
-
- //
http://css-tricks.com/rgba-browser-support/
- tests[rgba] = function() {
- // Set an rgba() color and check the returned value
-
- set_css( background + '-color:rgba(150,255,150,.5)' );
-
- return contains( m_style[backgroundColor], rgba );
- };
-
- tests[hsla] = function() {
- // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally
-
- set_css( background + '-color:hsla(120,40%,100%,.5)' );
-
- return contains( m_style[backgroundColor], rgba );
- };
-
- tests[multiplebgs] = function() {
- // Setting multiple images AND a color on the background shorthand property
- // and then querying the style.background property value for the number of
- // occurrences of "url(" is a reliable method for detecting ACTUAL
support for this!
-
- set_css( background + ':url(//:),url(//:),red url(//:)' );
-
- // If the UA supports multiple backgrounds, there should be three occurrences
- // of the string "url(" in the return value for elem_style.background
-
- return new RegExp("(url\\s*\\(.*?){3}").test(m_style[background]);
- };
-
-
- // In testing support for a given CSS property, it's legit to test:
- // elem.style[styleName] !== undefined
- // If the property is supported it will return an empty string,
- // if unsupported it will return undefined.
- // We'll take advantage of this quick test and skip setting a style
- // on our modernizr element, but instead just testing undefined vs
- // empty string.
- // The legacy set_css_all calls will remain in the source
- // (however, commented) in for clarity, yet functionally they are
- // no longer needed.
-
-
- tests[backgroundsize] = function() {
- return test_props_all( background + 'Size' );
- };
-
- tests[borderimage] = function() {
- // set_css_all( 'border-image:url(m.png) 1 1 stretch' );
- return test_props_all( 'borderImage' );
- };
-
-
- // super comprehensive table about all the unique implementations of
- // border-radius:
http://muddledramblings.com/table-of-css3-border-radius-compliance
-
- tests[borderradius] = function() {
- // set_css_all( 'border-radius:10px' );
- return test_props_all( 'borderRadius', '', function( prop ) {
- return contains( prop, 'orderRadius' );
- });
- };
-
-
- tests[boxshadow] = function() {
- // set_css_all( 'box-shadow:#000 1px 1px 3px' );
- return test_props_all( 'boxShadow' );
- };
-
-
- tests[opacity] = function() {
- // Browsers that actually have CSS Opacity implemented have done so
- // according to spec, which means their return values are within the
- // range of [0.0,1.0] - including the leading zero.
-
- set_css_all( 'opacity:.5' );
-
- return contains( m_style[opacity], '0.5' );
- };
-
-
- tests[cssanimations] = function() {
- // set_css_all( 'animation:"animate" 2s ease 2',
'position:relative' );
- return test_props_all( 'animationName' );
- };
-
-
- tests[csscolumns] = function() {
- // set_css_all( 'column-count:3' );
- return test_props_all( 'columnCount' );
- };
-
-
- tests[cssgradients] = function() {
- /**
- * For CSS Gradients syntax, please see:
- *
http://webkit.org/blog/175/introducing-css-gradients/
- *
https://developer.mozilla.org/en/CSS/-moz-linear-gradient
- *
https://developer.mozilla.org/en/CSS/-moz-radial-gradient
- *
http://dev.w3.org/csswg/css3-images/#gradients-
- */
-
- var str1 = background + '-image:',
- str2 = 'gradient(linear,left top,right
bottom,from(#9f9),to(white));',
- str3 = 'linear-gradient(left top,#9f9, white);';
-
- set_css(
- (str1 + prefixes.join(str2 + str1) + prefixes.join(str3 +
str1)).slice(0,-str1.length)
- );
-
- return contains( m_style.backgroundImage, 'gradient' );
- };
-
-
- tests[cssreflections] = function() {
- // set_css_all( 'box-reflect:right 1px' );
- return test_props_all( 'boxReflect' );
- };
-
-
- tests[csstransforms] = function() {
- // set_css_all( 'transform:rotate(3deg)' );
- return !!test_props([ 'transformProperty', 'WebkitTransform',
'MozTransform', 'OTransform', 'msTransform' ]);
- };
-
-
- tests[csstransforms3d] = function() {
- // set_css_all( 'perspective:500' );
-
- var ret = !!test_props([ 'perspectiveProperty',
'WebkitPerspective', 'MozPerspective', 'OPerspective',
'msPerspective' ]);
-
- // webkit has 3d transforms disabled for chrome, though
- // it works fine in safari on leopard and snow leopard
- // as a result, it 'recognizes' the syntax and throws a false positive
- // thus we must do a more thorough check:
- if (ret){
- var st = document.createElement('style'),
- div = doc.createElement('div');
-
- // webkit allows this media query to succeed only if the feature is enabled.
- // "@media
(transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#modernizr{height:3px}}"
- st.textContent = '@media
('+prefixes.join('transform-3d),(')+'modernizr){#modernizr{height:3px}}';
- doc.getElementsByTagName('head')[0].appendChild(st);
- div.id = 'modernizr';
- docElement.appendChild(div);
-
- ret = div.offsetHeight === 3;
-
- st.parentNode.removeChild(st);
- div.parentNode.removeChild(div);
- }
- return ret;
- };
-
-
- tests[csstransitions] = function() {
- // set_css_all( 'transition:all .5s linear' );
- return test_props_all( 'transitionProperty' );
- };
-
-
- // @font-face detection routine created by Paul Irish -
paulirish.com
- // Merged into Modernizr with approval. Read more about Paul's work here:
- //
http://paulirish.com/2009/font-face-feature-detection/
- tests[fontface] = function(){
-
- var fontret;
- if (/*@cc_on@if(@_jscript_version>=5)!@end@*/0) fontret = true;
-
- else {
-
- // Create variables for dedicated @font-face test
- var st = doc.createElement('style'),
- spn = doc.createElement('span'),
- size, isFakeBody = false, body = doc.body,
- callback, isCallbackCalled;
-
- // The following is a font-face + glyph definition for the . character:
- st.textContent =
"@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/j!
coAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2!
YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBo
AHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACA!
QIAEQt6ZXJva2F5YWhsaQ==')}";
- doc.getElementsByTagName('head')[0].appendChild(st);
-
- // we don't use `serif` and we don't use `monospace`
- //
http://github.com/Modernizr/Modernizr/issues/closed#issue/39
- //
http://neugierig.org/software/chromium/notes/2009/09/monospace-fonts-work...
- spn.setAttribute('style','font:99px
_,arial,helvetica;position:absolute;visibility:hidden');
-
- if (!body){
- body = docElement.appendChild(doc.createElement(fontface));
- isFakeBody = true;
- }
-
- // the data-uri'd font only has the . glyph; which is 3 pixels wide.
- spn.innerHTML = '........';
- spn.id = 'fonttest';
-
- body.appendChild(spn);
- size = spn.offsetWidth*spn.offsetHeight;
- spn.style.font = '99px testfont,_,arial,helvetica';
-
- // needed for the CSSFontFaceRule false positives (ff3, chrome, op9)
- fontret = size !== spn.offsetWidth*spn.offsetHeight;
-
- function delayedCheck(){
- if (!body.parentNode) return;
- fontret = ret[fontface] = size !== spn.offsetWidth*spn.offsetHeight;
- docElement.className =
docElement.className.replace(/(no-)?fontface\b/,'') + (fontret ? ' ' :
' no-') + fontface;
- }
-
- setTimeout(delayedCheck,fontfaceCheckDelay);
- setTimeout(delayedCheck,fontfaceCheckDelay*2);
- addEventListener('load',function(){
- delayedCheck();
- (isCallbackCalled = true) && callback &&
callback(fontret);
- setTimeout(function(){
- if (!isFakeBody) body = spn;
- body.parentNode.removeChild(body);
- st.parentNode.removeChild(st);
- }, 50);
- },false);
- }
-
- // allow for a callback
- ret._fontfaceready = function(fn){
- (isCallbackCalled || fontret) ? fn(fontret) : (callback = fn);
- }
-
- return fontret || size !== spn.offsetWidth;
-
- };
-
-
- // These tests evaluate support of the video/audio elements, as well as
- // testing what types of content they support.
- //
- // we're using the Boolean constructor here, so that we can extend the value
- // e.g. Modernizr.video // true
- // Modernizr.video.ogg // 'probably'
- //
- // codec values from :
http://github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
- // thx to NielsLeenheer and zcorpan
-
- tests[video] = function() {
- var elem = doc.createElement(video),
- bool = !!elem[canPlayType];
-
- if (bool){
- bool = new Boolean(bool);
- bool.ogg = elem[canPlayType]('video/ogg;
codecs="theora"');
- bool.h264 = elem[canPlayType]('video/mp4;
codecs="avc1.42E01E"');
- bool.webm = elem[canPlayType]('video/webm; codecs="vp8,
vorbis"');
- }
- return bool;
- };
-
- tests[audio] = function() {
- var elem = doc.createElement(audio),
- bool = !!elem[canPlayType];
-
- if (bool){
- bool = new Boolean(bool);
- bool.ogg = elem[canPlayType]('audio/ogg;
codecs="vorbis"');
- bool.mp3 = elem[canPlayType]('audio/mpeg;');
-
- // mimetypes accepted:
- //
https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and...
- //
http://bit.ly/iphoneoscodecs
- bool.wav = elem[canPlayType]('audio/wav; codecs="1"');
- bool.m4a = elem[canPlayType]('audio/x-m4a;') ||
elem[canPlayType]('audio/aac;');
- }
- return bool;
- };
-
-
- // both localStorage and sessionStorage are
- // tested in this method because otherwise Firefox will
- // throw an error:
https://bugzilla.mozilla.org/show_bug.cgi?id=365772
- // if cookies are disabled
-
- // FWIW miller device resolves to [object Storage] in all supporting browsers
- // except for IE who does [object Object]
-
- // IE8 Compat mode supports these features completely:
- //
http://www.quirksmode.org/dom/html5.html
-
- tests[localstorage] = function() {
- return ('localStorage' in window) && window[localstorage] !==
null;
- };
-
- tests[sessionstorage] = function() {
- // try/catch required for pissy FF behavior
- try {
- return ('sessionStorage' in window) && window[sessionstorage]
!== null;
- } catch(e){
- return false;
- }
- };
-
-
- tests[webWorkers] = function () {
- return !!window.Worker;
- };
-
-
- tests[applicationcache] = function() {
- var cache = window[applicationcache];
- return !!(cache && (typeof cache.status != 'undefined')
&& (typeof cache.update == 'function') && (typeof cache.swapCache
== 'function'));
- };
-
-
- // thanks to Erik Dahlstrom
- tests[svg] = function(){
- return !!doc.createElementNS && !!doc.createElementNS(
"http://www.w3.org/2000/svg", "svg").createSVGRect;
- };
-
- // thanks to F1lt3r and lucideer
- //
http://github.com/Modernizr/Modernizr/issues#issue/35
- tests[smil] = function(){
- return !!doc.createElementNS &&
/SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','animate')));
- };
-
- tests[svgclippaths] = function(){
- // returns a false positive in saf 3.2?
- return !!doc.createElementNS &&
/SVG/.test(tostring.call(doc.createElementNS('http://www.w3.org/2000/svg','clipPath')));
- };
-
-
- // input features and input types go directly onto the ret object, bypassing the
tests loop.
- // hold this guy to execute in a moment.
- function webforms(){
-
- // Run through HTML5's new input attributes to see if the UA understands
any.
- // We're using f which is the <input> element created early on
- // Mike Taylr has created a comprehensive resource for testing these attributes
- // when applied to all input types:
- //
http://miketaylr.com/code/input-type-attr.html
- // spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-ele...
- ret[input] = (function(props) {
- for (var i = 0,len=props.length;i<len;i++) {
- attrs[ props[i] ] = !!(props[i] in f);
- }
- return attrs;
- })('autocomplete autofocus list placeholder max min multiple pattern required
step'.split(' '));
-
- // Run through HTML5's new input types to see if the UA understands any.
- // This is put behind the tests runloop because it doesn't return a
- // true/false like all the other tests; instead, it returns an object
- // containing each input type with its corresponding true/false value
-
- // Big thx to @miketaylr for the html5 forms expertise.
http://miketaylr.com/
- ret[inputtypes] = (function(props) {
- for (var i = 0,bool,len=props.length;i<len;i++) {
- f.setAttribute('type', props[i]);
- bool = f.type !== 'text';
-
- // chrome likes to falsely purport support, so we feed it a textual
value
- // if that doesnt succeed then we know there's a custom UI
- if (bool){
-
- f.value = smile;
-
- /* Safari 4 is allowing the smiley as a value, and incorrecty
failing..
- the test fixes for webkit only, but breaks Opera..
- if (/range/.test(f.type)){
- bool = test_props_all('appearance',function(prop,m){
return m_style[prop] !== 'textfield' })
- }
- */
-
- if (/tel|search/.test(f.type)){
- // spec doesnt define any special parsing or detectable UI
- // behaviors so we pass these through as true
-
- } else if (/url|email/.test(f.type)) {
- // real url and email support comes with prebaked validation.
- bool = f.checkValidity && f.checkValidity() === false;
-
- } else {
- bool = f.value != smile;
- }
- }
-
- inputs[ props[i] ] = !!bool;
- }
- return inputs;
- })('search tel url email datetime date month week time datetime-local number
range color'.split(' '));
-
- }
-
-
-
- // end of test definitions
-
-
- // Run through all tests and detect their support in the current UA.
- // todo: hypothetically we could be doing an array of tests and use a basic loop
here.
- for ( var feature in tests ) {
- if ( hasOwnProperty( tests, feature ) ) {
- // run the test, throw the return value into the Modernizr,
- // then based on that boolean, define an appropriate className
- // and push it into an array of classes we'll join later.
- classes.push( ( ( ret[ feature.toLowerCase() ] = tests[ feature ]() ) ?
'' : 'no-' ) + feature.toLowerCase() );
- }
- }
-
- // input tests need to run.
- if (!ret[input]) webforms();
-
-
-
-
-
-
- /**
- * Addtest allows the user to define their own feature tests
- * the result will be added onto the Modernizr object,
- * as well as an appropriate className set on the html element
- *
- * @param feature - String naming the feature
- * @param test - Function returning true if feature is supported, false if not
- */
- ret.addTest = function (feature, test) {
- feature = feature.toLowerCase();
-
- if (ret[ feature ]) {
- return; // quit if you're trying to overwrite an existing test
- }
- test = !!(test());
- docElement.className += ' ' + (test ? '' : 'no-') +
feature;
- ret[ feature ] = test;
- return ret; // allow chaining.
- };
-
- /**
- * Reset m.style.cssText to nothing to reduce memory footprint.
- */
- set_css( '' );
- m = f = null;
-
- // Enable HTML 5 elements for styling in IE.
- // fyi: jscript version does not reflect trident version
- // therefore ie9 in ie7 mode will still have a jScript v.9
- if ( enableHTML5 && (function(){ var elem =
doc.createElement("div");
- elem.innerHTML =
"<elem></elem>";
- return elem.childNodes.length !== 1; })()) {
- // iepp v1.5.1 MIT @jon_neal
http://code.google.com/p/ie-print-protector/
- (function(p,e){function q(a,b){if(g[a])g[a].styleSheet.cssText+=b;else{var
c=r[l],d=e[j]("style");d.media=a;c.insertBefore(d,c[l]);g[a]=d;q(a,b)}}function
s(a,b){for(var c=new
RegExp("\\b("+m+")\\b(?!.*[;}])","gi"),d=function(k){return".iepp_"+k},h=-1;++h<a.length;){b=a[h].media||b;s(a[h].imports,b);q(b,a[h].cssText.replace(c,d))}}function
t(){for(var a,b=e.getElementsByTagName("*"),c,d,h=new
RegExp("^"+m+"$","i"),k=-1;++k<b.length;)if((a=b[k])&&(d=a.nodeName.match(h))){c=new
RegExp("^\\s*<"+d+"(.*)\\/"+d+">\\s*$","i");i.innerHTML=a.outerHTML.replace(/\r|\n/g,"
").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");c=i.childNodes[0];c.className+="
iepp_"+d;c=f[f.length]=[a,c];a.parentNode.replaceChild(c[1],c[0])}s(e.styleSheets,"all")}function
u(){for(var a=-1,b;++a<f.length;)f[a][1].parentNode.replaceChild(f[a][0],f[a][1]);for(b
in g)r[l].removeChild(g[b]);g={};f=[]}for(var
r=e.documentElement,i=e.createDocumentFragment(),g={},m="abbr|article|a!
side|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",n=m.split("|"),f=[],o=-1,l="firstChild",j="createElement";++o<n.length;){e[j](n[o]);i[j](n[o])}i=i.appendChild(e[j]("div"));p.attachEvent("onbeforeprint",t);p.attachEvent("onafterprint",u)})(this,doc);
- }
-
- // Assign private properties to the return object with prefix
- ret._enableHTML5 = enableHTML5;
- ret._version = version;
-
- // Remove "no-js" class from <html> element, if it exists:
- docElement.className=docElement.className.replace(/\bno-js\b/,'') + '
js';
-
- // Add the new classes to the <html> element.
- docElement.className += ' ' + classes.join( ' ' );
-
- return ret;
-
-})(this,this.document);
--
1.7.4.4