aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/checkin-context.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-25 01:17:49 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:44:00 +0200
commit3fe9f14f10381242a193d91f7dc8ea0307091f8e (patch)
tree5e4370700b0d6f5230587e63b4916cea348ac3d4 /data/lib/checkin-context.js
parent89f9e8aac15e6572293bada0a27335111d67403e (diff)
downloadbugzilla-triage-3fe9f14f10381242a193d91f7dc8ea0307091f8e.tar.gz
Working on cutting down lines from bug-page-mod.js
Diffstat (limited to 'data/lib/checkin-context.js')
-rw-r--r--data/lib/checkin-context.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/lib/checkin-context.js b/data/lib/checkin-context.js
new file mode 100644
index 0000000..4d073be
--- /dev/null
+++ b/data/lib/checkin-context.js
@@ -0,0 +1,11 @@
+on('click', function(node, data) {
+ var message = document.getElementById("__bz_tw_checkin_comment");
+ postMessage(message.textContent);
+});
+
+on('context', function(node) {
+ if (!onBugzillaPage(document.URL))
+ return false;
+ var message = document.getElementById("__bz_tw_checkin_comment");
+ return !!message;
+});