aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bug-page-mod.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 18:22:02 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-04-28 18:22:02 +0200
commit2382ba19afc84e9b747a7981ebf72aaa704f08b6 (patch)
tree7388be68a7277ed22a8900d6036843cddc504c22 /data/lib/bug-page-mod.js
parentf651df701f052f7836f29cd305a361bbee502653 (diff)
downloadbugzilla-triage-2382ba19afc84e9b747a7981ebf72aaa704f08b6.tar.gz
A bit of analysis of bugzilla-tweak script
Diffstat (limited to 'data/lib/bug-page-mod.js')
-rw-r--r--data/lib/bug-page-mod.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/data/lib/bug-page-mod.js b/data/lib/bug-page-mod.js
index 33742b3..e29b1bc 100644
--- a/data/lib/bug-page-mod.js
+++ b/data/lib/bug-page-mod.js
@@ -118,6 +118,8 @@ function tweakBugzilla(d) {
flags[name] = flagRows[i];
}
var flagCounter = 1;
+
+ // =================================================
function findFlag(item) {
function lookup(name) {
name = name.replace('\u2011', '-', 'g');
@@ -328,6 +330,8 @@ function tweakBugzilla(d) {
tbplbotSpamCollapser(d);
}
+// ===================================================
+
var TransformValues = {
linkifyURLs: function (str) {
return str.replace(/((https?|ftp)\:\/\/[\S]+)/g, '<a href="$1">$1</a>');
@@ -376,6 +380,8 @@ var TransformValues = {
}
};
+// ===============================================================================
+
function transform(str, type, doc, histDoc) {
for (var funcname in TransformValues) {
var func = TransformValues[funcname];
@@ -420,6 +426,8 @@ var TransformTypes = {
}
};
+// =======================================================================
+
function transformType(str, doc, old, new_) {
for (var funcname in TransformTypes) {
var func = TransformTypes[funcname];
@@ -453,6 +461,8 @@ function formatTransition(old, new_, type, doc, histDoc) {
return old + mid + new_;
}
+// =========================================================================
+
function trimContent(el) {
return el.textContent.trim();
}
@@ -476,6 +486,8 @@ AttachmentFlag.prototype = {
var reAttachmentDiff = /attachment\.cgi\?id=(\d+)&action=diff$/i;
var reviewBoardUrlBase = "http://reviews.visophyte.org/";
+// ===============================================================================
+
/**
* Whenever we find a patch with a diff, insert an additional link to asuth's
* review board magic.