diff --git a/CHANGELOG.md b/CHANGELOG.md index 80f4eb5..9f4d971 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ### HEAD +### 1.1.1 (February 28, 2014) + +* Added Support for Opera Next +* Updated Readme.md +* Updated Changelog.md + ### 1.1.0 (February 8, 2013) * Added simple Test Page diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4d5893..17841c2 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to HTML5 Boilerplate +# Contributing to Defunctr ♥ [Defunctr](http://github.com/victoriafrench/defunctr) and want to get involved? Thanks! There are plenty of ways you can help! diff --git a/README.md b/README.md index e751cbb..20c2814 100644 --- a/README.md +++ b/README.md @@ -14,34 +14,32 @@ Defunctr has the ability to exclude testing and tagging by appending any of the * `defunctr-version-off`: Defunctr will not add browser version classes to the `` element * `defunctr-lt-off`: Defunctr will not add less than version classes to the `` elememnt * `defunctr-gt-off`: Defunctr will not add greater than version classes to the `` element - + ### Classes created by Defunctr * `.ie` or `.no-ie`: Defines if the browser is Internet Explorer. This feature is always on. -* `.chrome` or `.no-chrome`: Defines if the browser is Chrome. This feature is turned off by adding `defunctr-ie-only`. -* `.safari` or `.no-safari`: Defines if the browser is Safari. This feature is turned off by adding `defunctr-ie-only`. -* `.webkit` or `.no-webkit`: Defines if the browser is Webkit including Chrome and Safari. This feature is turned off by adding `defunctr-ie-only`. -* `.firefox` or `.no-firefox`: Defines if the browser is Firefox. This feature is turned off by adding `defunctr-ie-only`. -* `.opera` or `.no-opera`: Defines if the browser is Opera. This feature is turned off by adding `defunctr-ie-only`. - - -* `.ie-version-7` and `.no-ie-version-7`: Defines if the browser is IE 7. This feature is turned off by adding `defunctr-version-off`. -* `.ie-version-8` and `.no-ie-version-8`: Defines if the browser is IE 8. This feature is turned off by adding `defunctr-version-off`. -* `.ie-version-9` and `.no-ie-version-9`: Defines if the browser is IE 9. This feature is turned off by adding `defunctr-version-off`. - -* `.ie-gt-6` and `.no-ie-gt-6`: Defines if the browser is IE 7+. This feature is turned off by adding `defunctr-gt-off`. -* `.ie-gt-7` and `.no-ie-gt-7`: Defines if the browser is IE 8+. This feature is turned off by adding `defunctr-gt-off`. -* `.ie-gt-8` and `.no-ie-gt-8`: Defines if the browser is IE 9+. This feature is turned off by adding `defunctr-gt-off`. -* `.ie-gt-9` and `.no-ie-gt-9`: Defines if the browser is IE 10+. This feature is turned off by adding `defunctr-gt-off`. - -* `.ie-lt-7` and `.no-ie-lt-7`: Defines if the browser is less than IE 7. This feature is turned off by adding `defunctr-lt-off`. -* `.ie-lt-8` and `.no-ie-lt-8`: Defines if the browser is less than IE 8. This feature is turned off by adding `defunctr-lt-off`. -* `.ie-lt-9` and `.no-ie-lt-9`: Defines if the browser is less than IE 9. This feature is turned off by adding `defunctr-lt-off`. -* `.ie-lt-10` and `.no-ie-lt-10`: Defines if the browser is less than IE 10. This feature is turned off by adding `defunctr-lt-off`. +* `.chrome` or `.no-chrome`: Defines if the browser is Chrome. +* `.safari` or `.no-safari`: Defines if the browser is Safari. +* `.webkit` or `.no-webkit`: Defines if the browser is Webkit including Chrome, Safari, and Opera Next. +* `.firefox` or `.no-firefox`: Defines if the browser is Firefox. +* `.opera` or `.no-opera`: Defines if the browser is Opera (non-webkit). +* `.opera-next` or `.no-opera-next`: Defines if the browser is Opera Next (webkit). +* `.ie-version-7` and `.no-ie-version-7`: Defines if the browser is IE 7. +* `.ie-version-8` and `.no-ie-version-8`: Defines if the browser is IE 8. +* `.ie-version-9` and `.no-ie-version-9`: Defines if the browser is IE 9. +* `.ie-gt-6` and `.no-ie-gt-6`: Defines if the browser is IE 7+. +* `.ie-gt-7` and `.no-ie-gt-7`: Defines if the browser is IE 8+. +* `.ie-gt-8` and `.no-ie-gt-8`: Defines if the browser is IE 9+. +* `.ie-gt-9` and `.no-ie-gt-9`: Defines if the browser is IE 10+. +* `.ie-lt-7` and `.no-ie-lt-7`: Defines if the browser is less than IE 7. +* `.ie-lt-8` and `.no-ie-lt-8`: Defines if the browser is less than IE 8. +* `.ie-lt-9` and `.no-ie-lt-9`: Defines if the browser is less than IE 9. +* `.ie-lt-10` and `.no-ie-lt-10`: Defines if the browser is less than IE 10. ### Limitations on this release * Opera can only be detected from version 8.0+ +* Opera Next is detected as Opera-Next not Opera. * Firefox can only be detected from version 0.8+ * Safari can only be detected from version 3.0+ * Chrome can only be detected from version 1.0+ diff --git a/nuget/Defunctr.1.1.1.nupkg b/nuget/Defunctr.1.1.1.nupkg new file mode 100755 index 0000000..f8d98d0 Binary files /dev/null and b/nuget/Defunctr.1.1.1.nupkg differ diff --git a/nuget/Defunctr.nuspec b/nuget/Defunctr.nuspec index 27f7e71..1a05bba 100755 --- a/nuget/Defunctr.nuspec +++ b/nuget/Defunctr.nuspec @@ -2,7 +2,7 @@ Defunctr - 1.1.0 + 1.1.1 Defunctr Victoria French Victoria French @@ -10,15 +10,15 @@ false Defunctr is a module for Modernizr that will detect the current browser using feature detection. It will then append browser informational classes to the head element of the page, giving the designer the ability to override CSS styles without using older browser hacks. Changing the browsers compatability mode will cause the correct classes to be applied and changing a user-agent will have not effect on the class generation. Defunctr is a module for Modernizr that will append browser versioning information into the head element of your web pages using feature detection. - Better detection of Internet Explorer and experimental support for KHtml - 2013 Victoria French + Now includes support for Opera Next. + 2013, 2104 Victoria French Modernizr, Browser Detection, HTML5, Shiv - - + + \ No newline at end of file diff --git a/src/defunctr-1.1.1.js b/src/defunctr-1.1.1.js new file mode 100755 index 0000000..f2e6625 --- /dev/null +++ b/src/defunctr-1.1.1.js @@ -0,0 +1,93 @@ +/* Defunctr 1.1.1 | MIT & BSD | Copyright 2013, 2014 Victoria French | http://github.com/victoriafrench/defunctr */ +window.Defunctr = (function (window, document, undefined) { + var version = '1.1.0', + r = {}; + docElement = document.documentElement, + docHead = document.head || document.getElementsByTagName('head')[0], + defunctr = 'defunctr'; + prefix = '', + gtoff = docElement.className.indexOf('defunctr-gt-off') > 0, + ltoff = docElement.className.indexOf('defunctr-lt-off') > 0, + voff = docElement.className.indexOf('defunctr-version-off') > 0, + onlyie = docElement.className.indexOf('defunctr-ie-only') > 0, + tests = []; + + r.detective = (function (window, document, undefined) { + var r = {}; + r.isWebkit = (function (document, undefined) { return 'WebkitTransform' in document.documentElement.style; /* v 1+ */})(document); + r.isOpera = (function (window, undefined) { return !!(window.opera && window.opera.version); /* 8.0+ */ })(window); + r.isIE = (function (window, undefined) { return 'ActiveXObject' in window; /*return (document.all != undefined) && !self.isOpera;*/ })(window); + r.isFirefox = (function (document, undefined) { return 'MozBoxSizing' in document.documentElement.style; /* 0.8+ */ })(document); + r.isSafari = (function (window, undefined) { return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; /*v 3+ */ })(window); + r.isKhtml = (function (document, undefined) { return 'KhtmlMarquee' in document.documentElement.style })(document); + r.isOperaNext = (function (self, navigator, undefined) { return self.isWebkit && /(Opera|OPR)/.test(navigator.userAgent); })(r, navigator); + r.isChrome = (function (self, undefined) { return !self.isSafari && !self.isOperaNext && self.isWebkit; })(r); + + r.ieBelowVersion6 = (function (self, document, undefined) { return self.isIE && !(document.compatMode != undefined); })(r, document); + r.ieBelowVersion7 = (function (self, window, undefined) { return self.isIE && !(window.XMLHttpRequest != undefined); })(r, window); + r.ieBelowVersion8 = (function (self, document, undefined) { return self.isIE && !(document.querySelector != undefined); })(r, document); + r.ieBelowVersion9 = (function (self, document, undefined) { return self.isIE && !(document.addEventListener != undefined); })(r, document); + r.ieBelowVersion10 = (function (self, window, undefined) { return self.isIE && !(window.atob != undefined); })(r, window); + r.ieAboveVersion5 = (function (self, window, undefined) { return self.isIE && (document.compatMode != undefined); })(r, window); + r.ieAboveVersion6 = (function (self, window, undefined) { return self.isIE && (window.XMLHttpRequest != undefined); })(r, window); + r.ieAboveVersion7 = (function (self, document, undefined) { return r.isIE && (document.querySelector != undefined); })(r, document); + r.ieAboveVersion8 = (function (self, window, undefined) { return self.isIE && (document.addEventListener != undefined); })(r, window); + r.ieAboveVersion9 = (function (self, window, undefined) { return self.isIE && (window.atob != undefined); })(r, window); + r.ieIsVersion6 = (function (self, undefined) { return self.ieAboveVersion5 && self.ieBelowVersion7; })(r); + r.ieIsVersion7 = (function (self, undefined) { return self.ieAboveVersion6 && self.ieBelowVersion8; })(r); + r.ieIsVersion8 = (function (self, undefined) { return self.ieAboveVersion7 && self.ieBelowVersion9; })(r); + r.ieIsVersion9 = (function (self, undefined) { return self.ieAboveVersion8 && self.ieBelowVersion10; })(r); + + + r.chromeIsAbove15 = (function (window, undefined) { return !!(window.chrome && window.chrome.webstore && window.chrome.webstore.install); })(window); + + + r.standardsCompliant = (function (self, undefined) { return r.ieAboveVersion9; })(r); + return r; + })(window, document); + + tests[prefix + 'ie'] = function () { return r.detective.isIE; }; + if (!onlyie) { + tests[prefix + 'chrome'] = function () { return r.detective.isChrome; }; + tests[prefix + 'safari'] = function () { return r.detective.isSafari; }; + tests[prefix + 'opera'] = function () { return r.detective.isOpera; }; + tests[prefix + 'opera-next'] = function() { return r.detective.isOperaNext; }; + tests[prefix + 'firefox'] = function () { return r.detective.isFirefox; }; + tests[prefix + 'khtml'] = function () { return r.detective.isKhtml; }; + tests[prefix + 'webkit'] = function () { return r.detective.isWebkit; }; + } + + if (!ltoff) { + tests[prefix + 'ie-lt-7'] = function () { return r.detective.ieBelowVersion7; }; + tests[prefix + 'ie-lt-8'] = function () { return r.detective.ieBelowVersion8; }; + tests[prefix + 'ie-lt-9'] = function () { return r.detective.ieBelowVersion9; }; + tests[prefix + 'ie-lt-10'] = function () { return r.detective.ieBelowVersion10; }; + } + + if (!gtoff) { + tests[prefix + 'ie-gt-6'] = function () { return r.detective.ieAboveVersion6; }; + tests[prefix + 'ie-gt-7'] = function () { return r.detective.ieAboveVersion7; }; + tests[prefix + 'ie-gt-8'] = function () { return r.detective.ieAboveVersion8; }; + tests[prefix + 'ie-gt-9'] = function () { return r.detective.ieAboveVersion9; }; + } + + if (!voff) { + tests[prefix + 'ie-version-7'] = function () { return r.detective.ieIsVersion7; }; + tests[prefix + 'ie-version-8'] = function () { return r.detective.ieIsVersion8; }; + tests[prefix + 'ie-version-9'] = function () { return r.detective.ieIsVersion9; }; + } + + r.version = version; + + for (key in tests) { + window.Modernizr.addTest(key, tests[key]); + } + + docElement.className = docElement.className.replace(/\bdefunctr-gt-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-lt-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-version-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-ie-only\b/, ''); + + return r; +})(this, this.document); + diff --git a/src/defunctr-1.1.1.min.js b/src/defunctr-1.1.1.min.js new file mode 100755 index 0000000..62716ec --- /dev/null +++ b/src/defunctr-1.1.1.min.js @@ -0,0 +1,2 @@ +/* Defunctr 1.1.1 | MIT & BSD | Copyright 2013, 2014 Victoria French | http://github.com/victoriafrench/defunctr */ +window.Defunctr=(function(d,a,e){var b="1.1.0",c={};docElement=a.documentElement,docHead=a.head||a.getElementsByTagName("head")[0],defunctr="defunctr";prefix="",gtoff=docElement.className.indexOf("defunctr-gt-off")>0,ltoff=docElement.className.indexOf("defunctr-lt-off")>0,voff=docElement.className.indexOf("defunctr-version-off")>0,onlyie=docElement.className.indexOf("defunctr-ie-only")>0,tests=[];c.detective=(function(h,f,i){var g={};g.isWebkit=(function(j,k){return"WebkitTransform" in j.documentElement.style;})(f);g.isOpera=(function(j,k){return !!(j.opera&&j.opera.version);})(h);g.isIE=(function(j,k){return"ActiveXObject" in j;})(h);g.isFirefox=(function(j,k){return"MozBoxSizing" in j.documentElement.style;})(f);g.isSafari=(function(j,k){return Object.prototype.toString.call(j.HTMLElement).indexOf("Constructor")>0;})(h);g.isKhtml=(function(j,k){return"KhtmlMarquee" in j.documentElement.style;})(f);g.isOperaNext=(function(k,j,l){return k.isWebkit&&/(Opera|OPR)/.test(j.userAgent);})(g,navigator);g.isChrome=(function(j,k){return !j.isSafari&&!j.isOperaNext&&j.isWebkit;})(g);g.ieBelowVersion6=(function(k,j,l){return k.isIE&&!(j.compatMode!=l);})(g,f);g.ieBelowVersion7=(function(j,k,l){return j.isIE&&!(k.XMLHttpRequest!=l);})(g,h);g.ieBelowVersion8=(function(k,j,l){return k.isIE&&!(j.querySelector!=l);})(g,f);g.ieBelowVersion9=(function(k,j,l){return k.isIE&&!(j.addEventListener!=l);})(g,f);g.ieBelowVersion10=(function(j,k,l){return j.isIE&&!(k.atob!=l);})(g,h);g.ieAboveVersion5=(function(j,k,l){return j.isIE&&(f.compatMode!=l);})(g,h);g.ieAboveVersion6=(function(j,k,l){return j.isIE&&(k.XMLHttpRequest!=l);})(g,h);g.ieAboveVersion7=(function(k,j,l){return g.isIE&&(j.querySelector!=l);})(g,f);g.ieAboveVersion8=(function(j,k,l){return j.isIE&&(f.addEventListener!=l);})(g,h);g.ieAboveVersion9=(function(j,k,l){return j.isIE&&(k.atob!=l);})(g,h);g.ieIsVersion6=(function(j,k){return j.ieAboveVersion5&&j.ieBelowVersion7;})(g);g.ieIsVersion7=(function(j,k){return j.ieAboveVersion6&&j.ieBelowVersion8;})(g);g.ieIsVersion8=(function(j,k){return j.ieAboveVersion7&&j.ieBelowVersion9;})(g);g.ieIsVersion9=(function(j,k){return j.ieAboveVersion8&&j.ieBelowVersion10;})(g);g.chromeIsAbove15=(function(j,k){return !!(j.chrome&&j.chrome.webstore&&j.chrome.webstore.install);})(h);g.standardsCompliant=(function(j,k){return g.ieAboveVersion9;})(g);return g;})(d,a);tests[prefix+"ie"]=function(){return c.detective.isIE;};if(!onlyie){tests[prefix+"chrome"]=function(){return c.detective.isChrome;};tests[prefix+"safari"]=function(){return c.detective.isSafari;};tests[prefix+"opera"]=function(){return c.detective.isOpera;};tests[prefix+"opera-next"]=function(){return c.detective.isOperaNext;};tests[prefix+"firefox"]=function(){return c.detective.isFirefox;};tests[prefix+"khtml"]=function(){return c.detective.isKhtml;};tests[prefix+"webkit"]=function(){return c.detective.isWebkit;};}if(!ltoff){tests[prefix+"ie-lt-7"]=function(){return c.detective.ieBelowVersion7;};tests[prefix+"ie-lt-8"]=function(){return c.detective.ieBelowVersion8;};tests[prefix+"ie-lt-9"]=function(){return c.detective.ieBelowVersion9;};tests[prefix+"ie-lt-10"]=function(){return c.detective.ieBelowVersion10;};}if(!gtoff){tests[prefix+"ie-gt-6"]=function(){return c.detective.ieAboveVersion6;};tests[prefix+"ie-gt-7"]=function(){return c.detective.ieAboveVersion7;};tests[prefix+"ie-gt-8"]=function(){return c.detective.ieAboveVersion8;};tests[prefix+"ie-gt-9"]=function(){return c.detective.ieAboveVersion9;};}if(!voff){tests[prefix+"ie-version-7"]=function(){return c.detective.ieIsVersion7;};tests[prefix+"ie-version-8"]=function(){return c.detective.ieIsVersion8;};tests[prefix+"ie-version-9"]=function(){return c.detective.ieIsVersion9;};}c.version=b;for(key in tests){d.Modernizr.addTest(key,tests[key]);}docElement.className=docElement.className.replace(/\bdefunctr-gt-off\b/,"");docElement.className=docElement.className.replace(/\bdefunctr-lt-off\b/,"");docElement.className=docElement.className.replace(/\bdefunctr-version-off\b/,"");docElement.className=docElement.className.replace(/\bdefunctr-ie-only\b/,"");return c;})(this,this.document); \ No newline at end of file diff --git a/src/defunctr.js b/src/defunctr.js new file mode 100755 index 0000000..d72a096 --- /dev/null +++ b/src/defunctr.js @@ -0,0 +1,93 @@ +/* Defunctr Nightly 1.1.Next | MIT & BSD | Copyright 2013 Victoria French | http://github.com/victoriafrench/defunctr */ +window.Defunctr = (function (window, document, undefined) { + var version = '1.1.0', + r = {}; + docElement = document.documentElement, + docHead = document.head || document.getElementsByTagName('head')[0], + defunctr = 'defunctr'; + prefix = '', + gtoff = docElement.className.indexOf('defunctr-gt-off') > 0, + ltoff = docElement.className.indexOf('defunctr-lt-off') > 0, + voff = docElement.className.indexOf('defunctr-version-off') > 0, + onlyie = docElement.className.indexOf('defunctr-ie-only') > 0, + tests = []; + + r.detective = (function (window, document, undefined) { + var r = {}; + r.isWebkit = (function (document, undefined) { return 'WebkitTransform' in document.documentElement.style; /* v 1+ */})(document); + r.isOpera = (function (window, undefined) { return !!(window.opera && window.opera.version); /* 8.0+ */ })(window); + r.isIE = (function (window, undefined) { return 'ActiveXObject' in window; /*return (document.all != undefined) && !self.isOpera;*/ })(window); + r.isFirefox = (function (document, undefined) { return 'MozBoxSizing' in document.documentElement.style; /* 0.8+ */ })(document); + r.isSafari = (function (window, undefined) { return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; /*v 3+ */ })(window); + r.isKhtml = (function (document, undefined) { return 'KhtmlMarquee' in document.documentElement.style })(document); + r.isOperaNext = (function (self, navigator, undefined) { return self.isWebkit && /(Opera|OPR)/.test(navigator.userAgent); })(r, navigator); + r.isChrome = (function (self, undefined) { return !self.isSafari && !self.isOperaNext && self.isWebkit; })(r); + + r.ieBelowVersion6 = (function (self, document, undefined) { return self.isIE && !(document.compatMode != undefined); })(r, document); + r.ieBelowVersion7 = (function (self, window, undefined) { return self.isIE && !(window.XMLHttpRequest != undefined); })(r, window); + r.ieBelowVersion8 = (function (self, document, undefined) { return self.isIE && !(document.querySelector != undefined); })(r, document); + r.ieBelowVersion9 = (function (self, document, undefined) { return self.isIE && !(document.addEventListener != undefined); })(r, document); + r.ieBelowVersion10 = (function (self, window, undefined) { return self.isIE && !(window.atob != undefined); })(r, window); + r.ieAboveVersion5 = (function (self, window, undefined) { return self.isIE && (document.compatMode != undefined); })(r, window); + r.ieAboveVersion6 = (function (self, window, undefined) { return self.isIE && (window.XMLHttpRequest != undefined); })(r, window); + r.ieAboveVersion7 = (function (self, document, undefined) { return r.isIE && (document.querySelector != undefined); })(r, document); + r.ieAboveVersion8 = (function (self, window, undefined) { return self.isIE && (document.addEventListener != undefined); })(r, window); + r.ieAboveVersion9 = (function (self, window, undefined) { return self.isIE && (window.atob != undefined); })(r, window); + r.ieIsVersion6 = (function (self, undefined) { return self.ieAboveVersion5 && self.ieBelowVersion7; })(r); + r.ieIsVersion7 = (function (self, undefined) { return self.ieAboveVersion6 && self.ieBelowVersion8; })(r); + r.ieIsVersion8 = (function (self, undefined) { return self.ieAboveVersion7 && self.ieBelowVersion9; })(r); + r.ieIsVersion9 = (function (self, undefined) { return self.ieAboveVersion8 && self.ieBelowVersion10; })(r); + + + r.chromeIsAbove15 = (function (window, undefined) { return !!(window.chrome && window.chrome.webstore && window.chrome.webstore.install); })(window); + + + r.standardsCompliant = (function (self, undefined) { return r.ieAboveVersion9; })(r); + return r; + })(window, document); + + tests[prefix + 'ie'] = function () { return r.detective.isIE; }; + if (!onlyie) { + tests[prefix + 'chrome'] = function () { return r.detective.isChrome; }; + tests[prefix + 'safari'] = function () { return r.detective.isSafari; }; + tests[prefix + 'opera'] = function () { return r.detective.isOpera; }; + tests[prefix + 'opera-next'] = function() { return r.detective.isOperaNext; }; + tests[prefix + 'firefox'] = function () { return r.detective.isFirefox; }; + tests[prefix + 'khtml'] = function () { return r.detective.isKhtml; }; + tests[prefix + 'webkit'] = function () { return r.detective.isWebkit; }; + } + + if (!ltoff) { + tests[prefix + 'ie-lt-7'] = function () { return r.detective.ieBelowVersion7; }; + tests[prefix + 'ie-lt-8'] = function () { return r.detective.ieBelowVersion8; }; + tests[prefix + 'ie-lt-9'] = function () { return r.detective.ieBelowVersion9; }; + tests[prefix + 'ie-lt-10'] = function () { return r.detective.ieBelowVersion10; }; + } + + if (!gtoff) { + tests[prefix + 'ie-gt-6'] = function () { return r.detective.ieAboveVersion6; }; + tests[prefix + 'ie-gt-7'] = function () { return r.detective.ieAboveVersion7; }; + tests[prefix + 'ie-gt-8'] = function () { return r.detective.ieAboveVersion8; }; + tests[prefix + 'ie-gt-9'] = function () { return r.detective.ieAboveVersion9; }; + } + + if (!voff) { + tests[prefix + 'ie-version-7'] = function () { return r.detective.ieIsVersion7; }; + tests[prefix + 'ie-version-8'] = function () { return r.detective.ieIsVersion8; }; + tests[prefix + 'ie-version-9'] = function () { return r.detective.ieIsVersion9; }; + } + + r.version = version; + + for (key in tests) { + window.Modernizr.addTest(key, tests[key]); + } + + docElement.className = docElement.className.replace(/\bdefunctr-gt-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-lt-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-version-off\b/, ''); + docElement.className = docElement.className.replace(/\bdefunctr-ie-only\b/, ''); + + return r; +})(this, this.document); + diff --git a/test/css/main.css b/test/css/main.css index 25673d4..f2d732b 100755 --- a/test/css/main.css +++ b/test/css/main.css @@ -99,7 +99,7 @@ textarea { .no-js .js-on { display: none; } .js .js-off { display: none; } .js .js-on { display: block; } - + .js-on span { display: none; } .ie .ielabel { display: inline; } .ie-lt-6 .ieoldlabel { display: inline; } @@ -114,6 +114,7 @@ textarea { .chrome .chromelabel { display: inline; } .webkit .wlabel { display: inline; } .firefox .fflabel { display: inline; } + .opera-next .operalabel { display: inline; } diff --git a/test/test.html b/test/test.html index 98691d8..843c756 100755 --- a/test/test.html +++ b/test/test.html @@ -15,10 +15,10 @@ -

Hello Unsupported (pre 6) Internet Explorer 6 7 8 9 10+ Firefox Opera KHtml Webkit (Safari) (Chrome)!

+

Hello Unsupported (pre 6) Internet Explorer 6 7 8 9 10+ Firefox Opera KHtml Webkit (Safari) (Chrome) (Opera)!

Please enable Javascript

- +