aboutsummaryrefslogtreecommitdiffstats
path: root/data/tweaks/bug-page-mod.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/tweaks/bug-page-mod.js')
-rw-r--r--data/tweaks/bug-page-mod.js42
1 files changed, 5 insertions, 37 deletions
diff --git a/data/tweaks/bug-page-mod.js b/data/tweaks/bug-page-mod.js
index f5d154e..32672b0 100644
--- a/data/tweaks/bug-page-mod.js
+++ b/data/tweaks/bug-page-mod.js
@@ -33,27 +33,6 @@
* ***** END LICENSE BLOCK *****
*/
-function TweakOnMessageHandler(msg, nextHandlerList) {
- switch (msg.cmd) {
- case "Unhandled":
- break;
- case "returnedHistory":
- processHistory(msg.data);
- break;
- default:
- if (nextHandlerList) {
- var nextHandler = nextHandlerList.splice(0, 1);
- if (nextHandler[0]) {
- nextHandler[0](msg, nextHandlerList);
- }
- }
- else {
- console.error("Error: unknown RPC call " + msg.toSource());
- }
- break;
- }
-}
-
/**
* generate XML-RPC call to collect complete history of the bug
*
@@ -61,9 +40,8 @@ function TweakOnMessageHandler(msg, nextHandlerList) {
* URL of the XML-RPC gateway on the particular bugzilla
* @returns nothing
*
- * As part of the message is name of the signal "returnedHistory"
*/
-function collectHistory(rpcURL) {
+function collectHistory() {
// https://bugzilla.redhat.com/docs/en/html/api/Bugzilla\
// /WebService/Bug.html#Bug_Information
/*
@@ -96,14 +74,7 @@ function collectHistory(rpcURL) {
The change will be made to the production servers in early May, with
notification to the announce list prior to the change.
*/
- var bugId = getBugNo();
- self.postMessage(new Message("MakeJSONRPCall", {
- url : rpcURL.replace("xmlrpc.cgi","jsonrpc.cgi"),
- login : getLogin(),
- method : "Bug.history",
- params : { "ids": [ bugId ] },
- callRPC : "returnedHistory"
- }));
+ makeJSONRPCCall("Bug.history", { "ids": [ getBugNo() ] }, processHistory);
}
function tweakBugzilla(things, cData) {
@@ -199,10 +170,7 @@ function tweakBugzilla(things, cData) {
var CheckinComment = new CheckinCommentCtor();
CheckinComment.initialize(AttachmentFlagHandler._interestingFlags);
- if (document.location.hostname in cData.XMLRPCData) {
- var XMLRPCUrl = cData.XMLRPCData[document.location.hostname].url;
- collectHistory(XMLRPCUrl);
- }
+ collectHistory();
tbplbotSpamCollapser();
}
@@ -334,7 +302,7 @@ return ; // FIXME just to get rid of this unfinished and unanalyzed function
// §§§§ This is a function addToInlineHistory or something TODO
var currentDiv = document.createElement("div");
var userPrefix = '';
- if (inline) {
+ if (inline) {
// assume that the change was made by the same user // XXX? §§§
commentHead.appendChild(currentDiv);
currentDiv.setAttribute("class", "bztw_inlinehistory");
@@ -408,7 +376,7 @@ return ; // FIXME just to get rid of this unfinished and unanalyzed function
formatTransition(trimContent(item[3]), trimContent(item[4]),
trimContent(item[2]), iframe.contentDocument);
-//
+//
var nextItemsCount = item[0].rowSpan;
for (var k = 1; k < nextItemsCount; ++k) {
// XXX doing once more the same for non-first elements of the imte array.