summaryrefslogtreecommitdiff
path: root/resources/startup.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /resources/startup.js
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'resources/startup.js')
-rw-r--r--resources/startup.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/startup.js b/resources/startup.js
new file mode 100644
index 00000000..52c320c6
--- /dev/null
+++ b/resources/startup.js
@@ -0,0 +1,34 @@
+/**
+ * This script provides a function which is run to evaluate whether or not to
+ * continue loading the jquery and mediawiki modules. This code should work on
+ * even the most ancient of browsers, so be very careful when editing.
+ */
+/**
+ * Returns false when run in a black-listed browser
+ *
+ * This function will be deleted after it's used, so do not expand it to be
+ * generally useful beyond startup
+ *
+ * jQuery has minimum requirements of:
+ * * Firefox 2.0+
+ * * Internet Explorer 6+
+ * * Safari 3+
+ * * Opera 9+
+ * * Chrome 1+
+ */
+var isCompatible = function() {
+ // IE < 6
+ if ( navigator.appVersion.indexOf( 'MSIE' ) !== -1
+ && parseFloat( navigator.appVersion.split( 'MSIE' )[1] ) < 6 )
+ {
+ return false;
+ }
+ // TODO: Firefox < 2
+ // TODO: Safari < 3
+ // TODO: Opera < 9
+ // TODO: Chrome < 1
+ return true;
+};
+/**
+ * The startUp() function will be generated and added here (at the bottom)
+ */