Array.prototype.keyExists = function(key) {
for (var i in this) {
if (i==key) return true;
}
return false;
};
Hopefully this is self explanatory as I'm being lazy and I'm not in the mood to write out detailed examples of how to use it.
Array.prototype.keyExists = function(key) {
for (var i in this) {
if (i==key) return true;
}
return false;
};
<script type="text/javascript" src="js/prototype.js"></script>
<FilesMatch "\\.js.gz$">
ForceType text/javascript
Header set Content-Encoding: gzip
</FilesMatch>
<FilesMatch "\\.js$">
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule (.*)\.js$ $1\.js.gz [L]
ForceType text/javascript
</FilesMatch>