SlideShare a Scribd company logo
1 of 65
jpf.jpg
modernizr-1.5.js
/*!
* 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
*/
/*
* LicenseModernizr is available under the MIT and BSD
licenses:
* MIT License
* Copyright (c) 2009–2010 Faruk Ate?
* 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.
* BSD License
* Copyright (c) 2010, Faruk Ate?
* All rights reserved.
* Redistribution and use in source and binary forms, with or
without
* modification, are permitted provided that the following
conditions are met:
* * Redistributions of source code must retain the above
copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
copyright
* notice, this list of conditions and the following disclaimer in
the
* documentation and/or other materials provided with the
distribution.
* * Neither the name of the Organization nor the
* names of its contributors may be used to endorse or promote
products
* derived from this software without specific prior written
permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT
HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
/*
* 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("(urls*(.*?){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
(/*@[email protected](@_jscript_version>=5)[email protected]
@*/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,AAEAAAAMAIAA
AwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJA
AAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAA
AACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQA
AAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAA
AABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANg
AAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACH
gAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesA
MwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAA
AAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAA
AAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAA
AK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZX
AwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAA
AAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB
AAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDA
AAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoA
AwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC8
8sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCq
v1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0
BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaA
ZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAA
AAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8Q
DxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAA
ADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAA
AAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAA
AAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKg
AqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQ
AAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAA
AQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAA
AAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKAR
sAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBA
kAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr
0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAk
ABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb
3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJl
bGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBG
b250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZ
WFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJ
hOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYW
VjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3Jn
ZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJ
hOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0Vm
Vyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQg
b2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9P
RkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5A
CAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAH
MAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHU
AbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbw
BmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAA
gAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAE
wAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGU
AbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQ
AgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiA
GEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyAC
AALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHI
AYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGI
AZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGU
AdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAM
gAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAA
gADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBj
ADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAg
AHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgA
EwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGI
AYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAI
AAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBh
AEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByA
GkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEw
AAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAA
AAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==
')}";
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/monospa
ce-fonts-workaround.html
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-)?fontfaceb/,'') + (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.ht
ml#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_video_elements
// 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.or
g/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.or
g/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-element.html#input-type-attr-
summary
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".ie
pp_"+k},h=-
1;++h<a.length;){b=a[h].media||b;s(a[h].imports,b);q(b,a[h].css
Text.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=ne
w
RegExp("^s*<"+d+"(.*)/"+d+">s*$","i");i.innerHTML=a.o
uterHTML.replace(/r|n/g,"
").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<s
pan$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|aside|audio|canvas|command|datalist|details|figure|fi
gcaption|footer|header|hgroup|keygen|mark|meter|nav|output|pro
gress|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("onbeforepri
nt",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-
jsb/,'') + ' js';
// Add the new classes to the <html> element.
docElement.className += ' ' + classes.join( ' ' );
return ret;
})(this,this.document);
stabletxt.css
/*
New Perspectives on HTML and CSS
Tutorial 5
Case Problem 1
Sudoku Puzzle Table Style Sheet
Author:
Date:
Filename: stable.css
Supporting Files: green.jpg, gold.jpg
*/
sudokutxt.htmHomeOnline PuzzlesStoreTips and
HintsForumCompetitionsSite MapAkariDivide by
BoxFillominoHashiwokakeroHeyawakeHitoriKakuroKatagakuM
asugoMasyuNonogramOekaki LogicShikakuSudokuSuhaiSuper
SudokuTenketsuTentai ShowWordokuYajilinTo Play
Sudoku is played on a 9x9 grid with nine 3x3 boxes
placed within the grid. Enter a digit from 1 to 9 in
each table cell. A few starting numbers have been
supplied for you. The digits from 1 to 9 can appear
only once each in every row, column, and box in the
table (diagonals don't count). Every Sudoku puzzle
has a unique solution.
Good luck!
gold.jpg
green.jpg
jpf.css
/*
New Perspectives on HTML and CSS
Tutorial 5
Case Problem 1
JPF Style Sheet
Author: Rebecca Peretz
Date: 3/1/2014
Filename: jpf.css
Supporting Files:
*/
/* Default styles */
* {
margin: 0px;
list-style: none;
padding: 0px;
text-decoration: none;
}
/* Body styles */
body {
font-family: Verdana, Geneva, sans-serif;
width: 900px;
margin: 0px auto;
}
/* Horizontal Navigation List */
nav.horizontal ul {
height: 24px;
margin-top: -30px;
width: 100%;
}
nav.horizontal ul li {
background-color: black;
display: inline;
font-size: 10px;
margin: 0px 15px 0px 10px;
}
nav.horizontal ul li a {
color: rgb(254, 232, 130);
}
nav.horizontal ul li a:hover {
color: rgb(211, 254, 106);
}
/* Vertical Navigation List */
nav.vertical ul {
background-color: black;
clear: left;
float: left;
width: 150px;
-moz-border-radius-bottomright: 100% 250px;
-webkit-border-bottom-right-radius: 100% 250px;
border-bottom-right-radius: 100% 250px;
}
nav.vertical ul li {
font-size: 12px;
line-height: 1.6em;
margin: 5px 0px 7px 10px;
}
nav.vertical ul li:first-of-type {
margin-top: 20px;
}
nav.vertical ul li:last-of-type {
padding-bottom: 30px;
}
nav.vertical ul li a {
color: rgb(254, 232, 130);
}
nav.vertical ul li a:hover {
color: rgb(211, 254, 106);
text-decoration: overline underline;
}
/* Main Page Section */
section {
float: left;
margin: 10px 0px 0px 20px;
width: 500px;
}
section article h1 {
font-size: 14px;
margin-top: 10px;
}
section article p {
font-size: 10px;
margin: 10px 0px;
width: 420px;
}
jpf.jpgmodernizr-1.5.js!  Modernizr JavaScript libra.docx

More Related Content

Similar to jpf.jpgmodernizr-1.5.js! Modernizr JavaScript libra.docx

Hello worldswing.java
Hello worldswing.javaHello worldswing.java
Hello worldswing.javaSubhash Kumar
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Developmentmukhtarhudaya
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksmwbrooks
 
Third party attributions-click-to-call
Third party attributions-click-to-callThird party attributions-click-to-call
Third party attributions-click-to-callRositadianamanullang
 
IIIF without an image server? No problem!
IIIF without an image server? No problem!IIIF without an image server? No problem!
IIIF without an image server? No problem!Simeon Warner
 
C# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityC# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityShreesha Rao
 
follow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdffollow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdfrchopra4
 
CSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfCSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfJonDan6
 
How do I write Testable Javascript so I can Test my CF API on Server and Client
How do I write Testable Javascript so I can Test my CF API on Server and ClientHow do I write Testable Javascript so I can Test my CF API on Server and Client
How do I write Testable Javascript so I can Test my CF API on Server and ClientGavin Pickin
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
 
Commenting in Agile Development
Commenting in Agile DevelopmentCommenting in Agile Development
Commenting in Agile DevelopmentJan Rybák Benetka
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)James Titcumb
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
 
Treatment, Architecture and Threads
Treatment, Architecture and ThreadsTreatment, Architecture and Threads
Treatment, Architecture and ThreadsMathias Seguy
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Eugenio Minardi
 
SlideShare API ''Get Slideshow Information'' method example with Groovy
SlideShare API ''Get Slideshow Information'' method example with GroovySlideShare API ''Get Slideshow Information'' method example with Groovy
SlideShare API ''Get Slideshow Information'' method example with GroovyKeiji Yamashita
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.shyboyzk
 
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docx
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docxRegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docx
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docxsodhi3
 

Similar to jpf.jpgmodernizr-1.5.js! Modernizr JavaScript libra.docx (20)

Hello worldswing.java
Hello worldswing.javaHello worldswing.java
Hello worldswing.java
 
Introduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software DevelopmentIntroduction to Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorks
 
Readme
ReadmeReadme
Readme
 
Third party attributions-click-to-call
Third party attributions-click-to-callThird party attributions-click-to-call
Third party attributions-click-to-call
 
IIIF without an image server? No problem!
IIIF without an image server? No problem!IIIF without an image server? No problem!
IIIF without an image server? No problem!
 
C# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityC# and Borland StarTeam Connectivity
C# and Borland StarTeam Connectivity
 
follow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdffollow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdf
 
CSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdfCSS Architecture - JSIL.pdf
CSS Architecture - JSIL.pdf
 
How do I write Testable Javascript so I can Test my CF API on Server and Client
How do I write Testable Javascript so I can Test my CF API on Server and ClientHow do I write Testable Javascript so I can Test my CF API on Server and Client
How do I write Testable Javascript so I can Test my CF API on Server and Client
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Commenting in Agile Development
Commenting in Agile DevelopmentCommenting in Agile Development
Commenting in Agile Development
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Treatment, Architecture and Threads
Treatment, Architecture and ThreadsTreatment, Architecture and Threads
Treatment, Architecture and Threads
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)
 
SlideShare API ''Get Slideshow Information'' method example with Groovy
SlideShare API ''Get Slideshow Information'' method example with GroovySlideShare API ''Get Slideshow Information'' method example with Groovy
SlideShare API ''Get Slideshow Information'' method example with Groovy
 
Couch db 浅漫游.
Couch db 浅漫游.Couch db 浅漫游.
Couch db 浅漫游.
 
Rm09a fin
Rm09a finRm09a fin
Rm09a fin
 
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docx
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docxRegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docx
RegistrationForm.DS_Store__MACOSXRegistrationForm._.DS_St.docx
 

More from priestmanmable

9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docxpriestmanmable
 
a 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxa 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxpriestmanmable
 
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docxpriestmanmable
 
92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docxpriestmanmable
 
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxA ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxpriestmanmable
 
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docxpriestmanmable
 
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docxpriestmanmable
 
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docxpriestmanmable
 
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docxpriestmanmable
 
9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docxpriestmanmable
 
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docxpriestmanmable
 
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docxpriestmanmable
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docxpriestmanmable
 
800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docxpriestmanmable
 
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docxpriestmanmable
 
8.0 RESEARCH METHODS These guidelines address postgr.docx
8.0  RESEARCH METHODS  These guidelines address postgr.docx8.0  RESEARCH METHODS  These guidelines address postgr.docx
8.0 RESEARCH METHODS These guidelines address postgr.docxpriestmanmable
 
95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docxpriestmanmable
 
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docxpriestmanmable
 
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docxpriestmanmable
 
8Network Security April 2020FEATUREAre your IT staf.docx
8Network Security  April 2020FEATUREAre your IT staf.docx8Network Security  April 2020FEATUREAre your IT staf.docx
8Network Security April 2020FEATUREAre your IT staf.docxpriestmanmable
 

More from priestmanmable (20)

9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx9©iStockphotoThinkstockPlanning for Material and Reso.docx
9©iStockphotoThinkstockPlanning for Material and Reso.docx
 
a 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docxa 12 page paper on how individuals of color would be a more dominant.docx
a 12 page paper on how individuals of color would be a more dominant.docx
 
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
978-1-5386-6589-318$31.00 ©2018 IEEE COSO Framework for .docx
 
92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx92 Academic Journal Article Critique  Help with Journal Ar.docx
92 Academic Journal Article Critique  Help with Journal Ar.docx
 
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docxA ) Society perspective90 year old female, Mrs. Ruth, from h.docx
A ) Society perspective90 year old female, Mrs. Ruth, from h.docx
 
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
9 dissuasion question Bartol, C. R., & Bartol, A. M. (2017)..docx
 
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
9 AssignmentAssignment Typologies of Sexual AssaultsT.docx
 
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
9 0 0 0 09 7 8 0 1 3 4 4 7 7 4 0 4ISBN-13 978-0-13-44.docx
 
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx900 BritishJournalofNursing,2013,Vol22,No15©2.docx
900 BritishJournalofNursing,2013,Vol22,No15©2.docx
 
9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx9 Augustine Confessions (selections) Augustine of Hi.docx
9 Augustine Confessions (selections) Augustine of Hi.docx
 
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
8.3 Intercultural CommunicationLearning Objectives1. Define in.docx
 
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
8413 906 AMLife in a Toxic Country - NYTimes.comPage 1 .docx
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
 
800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx800 Words 42-year-old man presents to ED with 2-day history .docx
800 Words 42-year-old man presents to ED with 2-day history .docx
 
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
8.1 What Is Corporate StrategyLO 8-1Define corporate strategy.docx
 
8.0 RESEARCH METHODS These guidelines address postgr.docx
8.0  RESEARCH METHODS  These guidelines address postgr.docx8.0  RESEARCH METHODS  These guidelines address postgr.docx
8.0 RESEARCH METHODS These guidelines address postgr.docx
 
95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx95People of AppalachianHeritageChapter 5KATHLEEN.docx
95People of AppalachianHeritageChapter 5KATHLEEN.docx
 
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
9 781292 041452ISBN 978-1-29204-145-2Forensic Science.docx
 
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx8-10 slide Powerpoint The example company is Tesla.Instructions.docx
8-10 slide Powerpoint The example company is Tesla.Instructions.docx
 
8Network Security April 2020FEATUREAre your IT staf.docx
8Network Security  April 2020FEATUREAre your IT staf.docx8Network Security  April 2020FEATUREAre your IT staf.docx
8Network Security April 2020FEATUREAre your IT staf.docx
 

Recently uploaded

24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfcupulin
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 

Recently uploaded (20)

24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 

jpf.jpgmodernizr-1.5.js! Modernizr JavaScript libra.docx

  • 1. jpf.jpg modernizr-1.5.js /*! * 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 */ /* * LicenseModernizr is available under the MIT and BSD licenses:
  • 2. * MIT License * Copyright (c) 2009–2010 Faruk Ate? * 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,
  • 3. * 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. * BSD License * Copyright (c) 2010, Faruk Ate? * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer.
  • 4. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Organization nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  • 5. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * 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
  • 6. * 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 = {},
  • 7. /** * 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
  • 8. 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.
  • 9. */ 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',
  • 10. 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
  • 11. 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',
  • 12. 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 = {},
  • 13. 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) {
  • 14. 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';
  • 15. } 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); }; }
  • 16. 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 ) {
  • 17. 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 ) {
  • 18. 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),
  • 19. // 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 ];
  • 20. 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'); }; /**
  • 21. * 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);
  • 22. }; */ /** * 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;
  • 23. }; 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]; };
  • 24. // 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')
  • 25. && 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 ); };
  • 26. 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(//:)' );
  • 27. // 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("(urls*(.*?){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
  • 28. // (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
  • 29. 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
  • 30. 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' );
  • 31. }; 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);';
  • 32. 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' ]);
  • 33. }; 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');
  • 34. // 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; };
  • 35. 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 (/*@[email protected](@_jscript_version>=5)[email protected] @*/0) fontret = true; else {
  • 36. // 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,AAEAAAAMAIAA AwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJA AAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAA AACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQA AAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAA AABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANg AAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACH gAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesA MwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAA AAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAA AAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAA AK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZX AwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAA AAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB AAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDA AAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoA AwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC8 8sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCq
  • 37. v1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0 BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaA ZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAA AAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8Q DxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAA ADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAA AAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAA AAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKg AqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQ AAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAA AQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAA AAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKAR sAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBA kAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr 0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAk ABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb 3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJl bGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBG b250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZ WFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJ hOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYW VjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3Jn ZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJ hOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0Vm Vyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQg b2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9P RkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5A CAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAH MAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHU AbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbw BmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAA gAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAE wAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGU AbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQ AgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiA GEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyAC
  • 38. AALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHI AYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGI AZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGU AdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAM gAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAA gADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBj ADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAg AHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgA EwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGI AYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAI AAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBh AEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByA GkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEw AAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAA AAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ== ')}"; 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/monospa ce-fonts-workaround.html spn.setAttribute('style','font:99px _,arial,helvetica;position:absolute;visibility:hidden'); if (!body){
  • 39. 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(){
  • 40. if (!body.parentNode) return; fontret = ret[fontface] = size !== spn.offsetWidth*spn.offsetHeight; docElement.className = docElement.className.replace(/(no-)?fontfaceb/,'') + (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);
  • 41. } // 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
  • 42. // Modernizr.video.ogg // 'probably' // // codec values from : http://github.com/NielsLeenheer/html5test/blob/9106a8/index.ht ml#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"'); }
  • 43. 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_video_elements // http://bit.ly/iphoneoscodecs bool.wav = elem[canPlayType]('audio/wav; codecs="1"');
  • 44. 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
  • 45. 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; };
  • 46. 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(){
  • 47. return !!doc.createElementNS && /SVG/.test(tostring.call(doc.createElementNS('http://www.w3.or g/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.or g/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
  • 48. // 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-element.html#input-type-attr- summary 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
  • 49. // 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..
  • 50. 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;
  • 51. } } 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.
  • 52. 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();
  • 53. /** * 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;
  • 54. 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
  • 55. 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".ie pp_"+k},h=- 1;++h<a.length;){b=a[h].media||b;s(a[h].imports,b);q(b,a[h].css Text.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=ne w RegExp("^s*<"+d+"(.*)/"+d+">s*$","i");i.innerHTML=a.o uterHTML.replace(/r|n/g," ").replace(c,a.currentStyle.display=="block"?"<div$1/div>":"<s pan$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|aside|audio|canvas|command|datalist|details|figure|fi gcaption|footer|header|hgroup|keygen|mark|meter|nav|output|pro gress|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("onbeforepri nt",t);p.attachEvent("onafterprint",u)})(this,doc); } // Assign private properties to the return object with prefix
  • 56. ret._enableHTML5 = enableHTML5; ret._version = version; // Remove "no-js" class from <html> element, if it exists: docElement.className=docElement.className.replace(/bno- jsb/,'') + ' js'; // Add the new classes to the <html> element. docElement.className += ' ' + classes.join( ' ' ); return ret; })(this,this.document); stabletxt.css /* New Perspectives on HTML and CSS Tutorial 5
  • 57. Case Problem 1 Sudoku Puzzle Table Style Sheet Author: Date: Filename: stable.css Supporting Files: green.jpg, gold.jpg */ sudokutxt.htmHomeOnline PuzzlesStoreTips and HintsForumCompetitionsSite MapAkariDivide by BoxFillominoHashiwokakeroHeyawakeHitoriKakuroKatagakuM asugoMasyuNonogramOekaki LogicShikakuSudokuSuhaiSuper SudokuTenketsuTentai ShowWordokuYajilinTo Play Sudoku is played on a 9x9 grid with nine 3x3 boxes placed within the grid. Enter a digit from 1 to 9 in each table cell. A few starting numbers have been supplied for you. The digits from 1 to 9 can appear only once each in every row, column, and box in the table (diagonals don't count). Every Sudoku puzzle has a unique solution.
  • 58. Good luck! gold.jpg green.jpg jpf.css /* New Perspectives on HTML and CSS Tutorial 5 Case Problem 1 JPF Style Sheet Author: Rebecca Peretz Date: 3/1/2014 Filename: jpf.css Supporting Files: */
  • 59. /* Default styles */ * { margin: 0px; list-style: none; padding: 0px; text-decoration: none; } /* Body styles */ body { font-family: Verdana, Geneva, sans-serif; width: 900px; margin: 0px auto; }
  • 60. /* Horizontal Navigation List */ nav.horizontal ul { height: 24px; margin-top: -30px; width: 100%; } nav.horizontal ul li { background-color: black; display: inline; font-size: 10px; margin: 0px 15px 0px 10px; } nav.horizontal ul li a { color: rgb(254, 232, 130); }
  • 61. nav.horizontal ul li a:hover { color: rgb(211, 254, 106); } /* Vertical Navigation List */ nav.vertical ul { background-color: black; clear: left; float: left; width: 150px; -moz-border-radius-bottomright: 100% 250px; -webkit-border-bottom-right-radius: 100% 250px; border-bottom-right-radius: 100% 250px; }
  • 62. nav.vertical ul li { font-size: 12px; line-height: 1.6em; margin: 5px 0px 7px 10px; } nav.vertical ul li:first-of-type { margin-top: 20px; } nav.vertical ul li:last-of-type { padding-bottom: 30px; } nav.vertical ul li a { color: rgb(254, 232, 130); }
  • 63. nav.vertical ul li a:hover { color: rgb(211, 254, 106); text-decoration: overline underline; } /* Main Page Section */ section { float: left; margin: 10px 0px 0px 20px; width: 500px; } section article h1 { font-size: 14px; margin-top: 10px;
  • 64. } section article p { font-size: 10px; margin: 10px 0px; width: 420px; }