summaryrefslogtreecommitdiff
path: root/misc/update.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/update.js')
-rw-r--r--misc/update.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/misc/update.js b/misc/update.js
new file mode 100644
index 000000000..e4358d269
--- /dev/null
+++ b/misc/update.js
@@ -0,0 +1,20 @@
+if (isJsEnabled()) {
+ addLoadEvent(function() {
+ if ($('edit-has_js')) {
+ $('edit-has_js').value = 1;
+ }
+
+ if ($('progress')) {
+ updateCallback = function (progress, status) {
+ if (progress == 100) {
+ window.location = window.location.href.split('op=')[0] +'op=finished';
+ }
+ }
+
+ this.progress = new progressBar('updateprogress', updateCallback, HTTPPost);
+ this.progress.setProgress(-1, 'Starting updates...');
+ $('progress').appendChild(this.progress.element);
+ this.progress.startMonitoring('update.php?op=do_update', 0);
+ }
+ });
+}