summaryrefslogtreecommitdiffstats
path: root/sitestatic
diff options
context:
space:
mode:
Diffstat (limited to 'sitestatic')
-rw-r--r--sitestatic/archweb.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index 1ddf4eb..c274a67 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -425,3 +425,13 @@ function format_filesize(size, decimals) {
return size.toFixed(decimals) + ' ' + labels[label];
}
+
+/* HTML5 input type and attribute enhancements */
+function modify_attributes(to_change) {
+ /* jQuery doesn't let us change the 'type' attribute directly due to IE
+ woes, so instead we can clone and replace, setting the type. */
+ $.each(to_change, function(id, attrs) {
+ var obj = $(id);
+ obj.replaceWith(obj.clone().attr(attrs));
+ });
+}