From ba0b4d6110e5b50c15ce722a5a123bcf26bafe3e Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 9 Feb 2011 10:56:33 +0100 Subject: Mainly add XML-RPC handling In details: * add libbugzilla.makeXMLRPCCall * rewrite addAttachment and fixAttachById to use it * add RHOnMessageHandler to process RHBZ-specific RPC messages * fix the mess around getting passwords and not-provided passwords (there should be no password in a content script) * add libbugzilla.openURLinPanel and make showAttachment to use it * fix indentation of switch statements * remove JSLint strings, we need to fix the script, no screw up my ones --- data/util.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'data/util.js') diff --git a/data/util.js b/data/util.js index e6871eb..7753458 100644 --- a/data/util.js +++ b/data/util.js @@ -43,15 +43,19 @@ function parseXMLfromString (inStuff) { return new XML(respStr); } +/** + * Get a bug no + */ +function getBugNo() { + return document.forms.namedItem('changeform').getElementsByName("id")[0].value; +} + /** * Get a bug no from URL ... fails with aliases - * It should theoretically belong to bzpage.js, but we don't have - * unit tests there yet, so keeping here. - * * @param url String with URL to be analyzed - * @return String with the bug ID (hopefully number, but not for aliases) + * @return String with the bug ID */ -function getBugNo(url) { +function getBugNoFromURL(url) { var params = getParamsFromURL(url); if (params && params.id) { return params.id; -- cgit