aboutsummaryrefslogtreecommitdiffstats
path: root/bugzillaBugTriage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:23 +0100
committerMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:23 +0100
commit5333869aac2dbd71c91727dbca6aee1a46b3cdb1 (patch)
treefccd59b1c901393c13c63ab12db9c8db4dd7c113 /bugzillaBugTriage.js
parent7ae28278cf7f4920175058971dee2b06b0e331b8 (diff)
downloadbugzilla-triage-5333869aac2dbd71c91727dbca6aee1a46b3cdb1.tar.gz
Starting to work on the offline capabilities.
Diffstat (limited to 'bugzillaBugTriage.js')
-rw-r--r--bugzillaBugTriage.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index 06af057..041ed05 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -1670,6 +1670,27 @@ var callback = function (doc) {
var curPage = new BzPage(doc);
};
+/* FIXME
+ - consider offline status
+ function newsubmit(event) {
+ var target = event ? event.target : this;
+
+ // do anything you like here
+ alert('Submitting form to ' + target.action);
+
+ // call real submit function
+ this._submit();
+}
+
+// capture the onsubmit event on all forms
+window.addEventListener('submit', newsubmit, true);
+
+// If a script calls someForm.submit(), the onsubmit event does not fire,
+// so we need to redefine the submit method of the HTMLFormElement class.
+HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
+HTMLFormElement.prototype.submit = newsubmit;
+ */
+
var options = {};
options.matches = [
"https://bugzilla.redhat.com/show_bug.cgi"