Switch to hasFeature(), which seems perfectly suited for this.
form-to-http-auth.js
Wed Oct 27 23:48:14 UTC 2010 pix@kepibu.org
* Switch to hasFeature(), which seems perfectly suited for this.
--- old-httpauth/form-to-http-auth.js 2015-04-15 14:59:33.000000000 +0000
+++ new-httpauth/form-to-http-auth.js 2015-04-15 14:59:33.000000000 +0000
@@ -1,7 +1,7 @@
(function () {
function form2httpAuth () {
/* Skip if the browser indicates it does this itself. */
- if (this.className.match(/(\\s|^)natively-supported(\\s|$)/))
+ if (document.implementation.hasFeature("HTTPFormAuth", "1.0"))
return true;
/* Attempt login with provided credentials. */