diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-05-13 12:20:05 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:53:47 +0200 |
commit | 83fd7fd92e5b21a177bc16cc7318792cf63a343b (patch) | |
tree | 20f3e5a59eb9ce32a9b9973d7131e7135bd94999 /data/lib | |
parent | 5b837d6739a12a516203fa0505ca562839463a79 (diff) | |
download | bugzilla-triage-83fd7fd92e5b21a177bc16cc7318792cf63a343b.tar.gz |
Really Eclipseize formatting.
Diffstat (limited to 'data/lib')
-rw-r--r-- | data/lib/addAttachmentRow.js | 48 | ||||
-rw-r--r-- | data/lib/bugzillaDOMFunctions.js | 12 | ||||
-rw-r--r-- | data/lib/bzpage.js | 48 | ||||
-rw-r--r-- | data/lib/color.js | 22 | ||||
-rw-r--r-- | data/lib/makeBacktraceAttachment.js | 58 | ||||
-rw-r--r-- | data/lib/otherButtons.js | 13 | ||||
-rw-r--r-- | data/lib/queries.js | 10 | ||||
-rw-r--r-- | data/lib/util.js | 66 |
8 files changed, 139 insertions, 138 deletions
diff --git a/data/lib/addAttachmentRow.js b/data/lib/addAttachmentRow.js index 3bee73a..16eb02c 100644 --- a/data/lib/addAttachmentRow.js +++ b/data/lib/addAttachmentRow.js @@ -1,8 +1,8 @@ -// Released under the MIT/X11 license -// http://www.opensource.org/licenses/mit-license.php +//Released under the MIT/X11 license +//http://www.opensource.org/licenses/mit-license.php "use strict"; -// FIXME resp is JSON, not XML anymore +//FIXME resp is JSON, not XML anymore function addAttachmentCallback(resp) { var newAttachID = parseInt( resp.params.param.value.array.data.value.int, 10); @@ -11,28 +11,28 @@ function addAttachmentCallback(resp) { } /** - * + * * This has to stay in RHBugzillaPage because upstream doesn't have * addAttachment XML-RPC call yet. * Params: $params = { - id => '<bug_id>', # ID of the bug report - comment => "<Attachment Comment>", # OPTIONAL Text string containing comment to add. - description => "<Attachment Description>", # REQUIRED Text Description of the attachment. - isprivate => <Private Attachment ON/OFF 1/0>, # OPTIONAL Whether the Attachment - will be private # Default: false - filename => "<Attachment Filename>", REQUIRED The name of the file to attach to the bug report. - obsoletes => [List of attach_id's to obsolete], OPTIONAL List if attachment ids that are - obsoleted by this new attachment. - ispatch => <Patch Attachment True/False 1/0>, OPTIONAL Whether the attachment is a Patch - or not, if not provided the it will be considered NON Patch attachment. - contenttype => "<Attachment Content Type>", OPTIONAL If the attachment is patch - REQUIRED If the attachment is not a patch - If the attachment is patch then contenttype will always be text/plain - data => "<Encoded String of the Attachment Data>", REQUIRED It is a base64 - encoded string of the actual attachment data. - nomail => 0, OPTIONAL Flag that is either 1 or 0 if you want email - to be send ot not for this change } + id => '<bug_id>', # ID of the bug report + comment => "<Attachment Comment>", # OPTIONAL Text string containing comment to add. + description => "<Attachment Description>", # REQUIRED Text Description of the attachment. + isprivate => <Private Attachment ON/OFF 1/0>, # OPTIONAL Whether the Attachment + will be private # Default: false + filename => "<Attachment Filename>", REQUIRED The name of the file to attach to the bug report. + obsoletes => [List of attach_id's to obsolete], OPTIONAL List if attachment ids that are + obsoleted by this new attachment. + ispatch => <Patch Attachment True/False 1/0>, OPTIONAL Whether the attachment is a Patch + or not, if not provided the it will be considered NON Patch attachment. + contenttype => "<Attachment Content Type>", OPTIONAL If the attachment is patch + REQUIRED If the attachment is not a patch + If the attachment is patch then contenttype will always be text/plain + data => "<Encoded String of the Attachment Data>", REQUIRED It is a base64 + encoded string of the actual attachment data. + nomail => 0, OPTIONAL Flag that is either 1 or 0 if you want email + to be send ot not for this change } */ function addAttachment(data, callback, param) { var params = []; @@ -44,7 +44,7 @@ function addAttachment(data, callback, param) { } var params = { - id: getBugNo(), + id : getBugNo(), description : titleParsedAttachment, filename : "parsed-backtrace.txt", contenttype : "text/plain", @@ -53,8 +53,8 @@ function addAttachment(data, callback, param) { }; self.postMessage(new Message("MakeJSONRPCCall", { - url : constantData.XMLRPCData[window.location.hostname].url. - replace("xmlrpc.cgi","jsonrpc.cgi"), + url : constantData.XMLRPCData[window.location.hostname].url + .replace("xmlrpc.cgi", "jsonrpc.cgi"), method : "bugzilla.addAttachment", params : params, callRPC : "AddAttachmentCallback" diff --git a/data/lib/bugzillaDOMFunctions.js b/data/lib/bugzillaDOMFunctions.js index 6823bc1..8f74288 100644 --- a/data/lib/bugzillaDOMFunctions.js +++ b/data/lib/bugzillaDOMFunctions.js @@ -165,8 +165,8 @@ function createNewButton (location, after, cmdObj) { var newId = cmdObj.name.toLowerCase().replace(/[^a-z0-9]+/,"","g") + "_btn"; } catch (e) { console.error("createNewButton : e = " + e + - "\ncreateNewButton : cmdObj.toSource() = " + - cmdObj.toSource()); + "\ncreateNewButton : cmdObj.toSource() = " + + cmdObj.toSource()); } // protection against double-firings @@ -259,7 +259,7 @@ function getProduct() { function commentsWalker (fce) { var comments = document.getElementById("comments"). - getElementsByClassName("bz_comment"); + getElementsByClassName("bz_comment"); Array.forEach(comments, function(item) { fce(item); }); @@ -298,7 +298,7 @@ function parseAttachmentLine(inElem) { // getting MIME type and size var stringArray = inElem.getElementsByClassName("bz_attach_extra_info")[0].textContent. - replace(/[\n ()]+/g, " ").trim().split(", "); + replace(/[\n ()]+/g, " ").trim().split(", "); size = parseInt(stringArray[0], 10); MIMEtype = stringArray[1].split(" ")[0]; @@ -316,7 +316,7 @@ function parseAttachmentLine(inElem) { function getAttachments () { var outAtts = []; var atts = document.getElementById("attachment_table"). - getElementsByTagName("tr"); + getElementsByTagName("tr"); for ( var i = 1, ii = atts.length - 1; i < ii; i++) { outAtts.push(parseAttachmentLine(atts[i])); } @@ -436,7 +436,7 @@ function isEnterprise() { * @return Boolean whether the bug has been triaged or not */ function isTriaged() { - return hasKeyword("Triaged"); + return hasKeyword("Triaged"); } /** diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js index 10c71fb..aa496cf 100644 --- a/data/lib/bzpage.js +++ b/data/lib/bzpage.js @@ -9,14 +9,14 @@ var NumberOfFrames = 7; // constants var SalmonPink = new Color(255, 224, 176); // RGB 255, 224, 176; HSL 36, 2, - // 85 +// 85 var ReporterColor = new Color(255, 255, 166); // RGB 255, 255, 166; HSL 60, 2, - // 83 +// 83 // global variables var config = {}; var constantData = {}; // This should be probably eliminated ASAP or - // or done by other means. TODO +// or done by other means. TODO var equivalentComponents = null; /** * central handler processing messages from the main script. @@ -34,7 +34,7 @@ self.on('message', function onMessage(msg) { constantData = msg.data.constData; config = msg.data.config; equivalentComponents = ("equivalentComponents" in constantData) ? - constantData.equivalentComponents : null; + constantData.equivalentComponents : null; generateButtons(msg.data.instPkgs, msg.data.kNodes); completeInit(); break; @@ -131,7 +131,7 @@ function centralCommandDispatch (cmdLabel, cmdParams) { clickMouse("bz_url_edit_action"); document.getElementById("bug_file_loc").value = cmdParams; break; - // TODO dependson/blocked doesn't work. Find out why. + // TODO dependson/blocked doesn't work. Find out why. case "addDependsOn": clickMouse("dependson_edit_action"); addStuffToTextBox("dependson", cmdParams); @@ -165,7 +165,7 @@ function centralCommandDispatch (cmdLabel, cmdParams) { case "queryStringOurBugzilla": queryForSelection(); break; - // TODO flags, see also + // TODO flags, see also case "commit": if (cmdParams) { // Directly commit the form @@ -179,7 +179,7 @@ function centralCommandDispatch (cmdLabel, cmdParams) { else { console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams); } - break; + break; } } @@ -200,7 +200,7 @@ function changeAssignee (newAssignee) { // Optional value null if (newAssignee === null) { document.getElementById("set_default_assignee").removeAttribute( - "checked"); + "checked"); return ; } @@ -273,8 +273,8 @@ function generateButtons (pkgs, kNodes) { // ========================================================= if (kNodes && window.location.hostname in kNodes) { - var killConf = kNodes[window.location.hostname]; - killNodes(document, killConf[0], killConf[1]); + var killConf = kNodes[window.location.hostname]; + killNodes(document, killConf[0], killConf[1]); } // create anchor for the top toolbar @@ -300,14 +300,14 @@ function generateButtons (pkgs, kNodes) { break; default: // [+-]ID var firstChr = cmdObj.position.charAt(0); - var newId = cmdObj.position.substr(1); - createNewButton(newId, firstChr === "+", cmdObj); - break; + var newId = cmdObj.position.substr(1); + createNewButton(newId, firstChr === "+", cmdObj); + break; } } else { console.error("generateButtons : rejected cmdObj = " + - cmdObj.toSource()); + cmdObj.toSource()); } } } @@ -320,12 +320,12 @@ function setConfigurationButton () { + "Triage configuration</a>"; additionalButtons.appendChild(configurationButtonUI); document.getElementById("configurationButton").addEventListener( - "click", - function(evt) { - self.postMessage(new Message("ChangeJSONURL", null)); - evt.stopPropagation(); - evt.preventDefault(); - }, false); + "click", + function(evt) { + self.postMessage(new Message("ChangeJSONURL", null)); + evt.stopPropagation(); + evt.preventDefault(); + }, false); } /** @@ -346,15 +346,15 @@ function getOptionTableCell(tableId, label) { if (ourLine.length > 0) { return ourLine[0].getElementsByTagName("td")[1]. - getElementsByTagName("a")[0]; + getElementsByTagName("a")[0]; } return null; } /** - * Complete startup, mainly run alternate inits for non-standard BZ - * with proper arguments + * Complete startup, mainly run alternate inits for non-standard BZ with proper + * arguments * */ function completeInit() { @@ -394,7 +394,7 @@ function startup() { if (brElementPlacer) { brElementPlacer.setAttribute("id","brElementPlacer_location"); brElementPlacer.parentNode.insertBefore(document.createElement("br"), - brElementPlacer); + brElementPlacer); } } diff --git a/data/lib/color.js b/data/lib/color.js index 4d0c41f..0031c5c 100644 --- a/data/lib/color.js +++ b/data/lib/color.js @@ -1,11 +1,11 @@ -// Released under the MIT/X11 license -// http://www.opensource.org/licenses/mit-license.php +//Released under the MIT/X11 license +//http://www.opensource.org/licenses/mit-license.php "use strict"; -// ============================================================================ -// Color management methods -// originally from -// http://www.mjijackson.com/2008/02\ -// /rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript +//============================================================================ +//Color management methods +//originally from +//http://www.mjijackson.com/2008/02\ +///rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript function Color(r, g, b) { this.Luminosity = 0.85; this.Desaturated = 0.4; @@ -51,7 +51,7 @@ Color.prototype.toString = function() { * Converts an RGB color value to HSL. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSL_color_space. Assumes r, g, and b are * contained in the set [0, 255] and returns h, s, and l in the set [0, 1].4343 - * + * * @param Number * r The red color value * @param Number @@ -96,7 +96,7 @@ Color.prototype.hsl = function() { * Converts an HSL color value to RGB. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are * contained in the set [0, 1] and returns r, g, and b in the set [0, 255]. - * + * * @param Number * h The hue * @param Number @@ -147,7 +147,7 @@ Color.prototype.hslToRgb = function(h, s, l) { * Converts an RGB color value to HSV. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSV_color_space. Assumes r, g, and b are * contained in the set [0, 255] and returns h, s, and v in the set [0, 1]. - * + * * @param Number * r The red color value * @param Number @@ -193,7 +193,7 @@ Color.prototype.hsv = function() { * Converts an HSV color value to RGB. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSV_color_space. Assumes h, s, and v are * contained in the set [0, 1] and returns r, g, and b in the set [0, 255]. - * + * * @param Number * h The hue * @param Number diff --git a/data/lib/makeBacktraceAttachment.js b/data/lib/makeBacktraceAttachment.js index 6011c06..9fc72bc 100644 --- a/data/lib/makeBacktraceAttachment.js +++ b/data/lib/makeBacktraceAttachment.js @@ -1,9 +1,9 @@ -// Released under the MIT/X11 license -// http://www.opensource.org/licenses/mit-license.php +//Released under the MIT/X11 license +//http://www.opensource.org/licenses/mit-license.php var titleParsedAttachment = "Part of the thread where crash happened"; /** - * + * */ function pasteBacktraceInComments(atts) { /* @@ -20,11 +20,11 @@ function pasteBacktraceInComments(atts) { return null; var abrtQueryURL = "https://bugzilla.redhat.com/buglist.cgi?" - + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&" - + "sharer_id=74116"; + + "cmdtype=dorem&remaction=run&namedcmd=all%20NEW%20abrt%20crashes&" + + "sharer_id=74116"; var mainTitle = document - .getElementsByClassName("bz_alias_short_desc_container")[0]; + .getElementsByClassName("bz_alias_short_desc_container")[0]; createDeadLink("callAbrtQuery_link", "Abrt bugs", mainTitle, abrtQueryURL, [], false, null, "a"); @@ -42,25 +42,25 @@ function pasteBacktraceInComments(atts) { // just the first one will do for now, we would need to do async // btAttachments - .forEach( - function(x) { - var attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" - + x[1]; - if ((!btSnippet) && // ???? FIXME + .forEach( + function(x) { + var attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + + x[1]; + if ((!btSnippet) && // ???? FIXME (!idContainsWord("status_whiteboard", 'btparsed'))) { - Request({ - url : attURL, - onComplete : function(response) { - if (response.status == 200) { - btSnippet = parseBacktrace(response.text); - if (btSnippet) { - addCheckShowLink(x, btSnippet); - } - } + Request({ + url : attURL, + onComplete : function(response) { + if (response.status == 200) { + btSnippet = parseBacktrace(response.text); + if (btSnippet) { + addCheckShowLink(x, btSnippet); } - }).get(); + } } - }, this); + }).get(); + } + }, this); } // Add "show BT" links if (parsedAttachments.length > 0) { @@ -72,7 +72,7 @@ function pasteBacktraceInComments(atts) { /** * Open new window with the content of the attachment. - * + * * @param id * Number of the attachment id * @return none @@ -84,7 +84,7 @@ function showAttachment(id) { /** * add a link opening a window with the parsed backtrace - * + * * @param att * Attachment object */ @@ -100,7 +100,7 @@ function addShowParsedBTLink(att) { function addNewAttachmentRow(origAtt, newAttId, newAttSize) { var that = this; var oldAddBTLink = document - .getElementById("attachBacktraceActivator"); + .getElementById("attachBacktraceActivator"); oldAddBTLink.parentNode.removeChild(oldAddBTLink); var newTRElem = origAtt[4].cloneNode(true); @@ -116,9 +116,9 @@ function addNewAttachmentRow(origAtt, newAttId, newAttSize) { aElements[0].getElementsByTagName("b")[0].textContent = titleParsedAttachment; var sizeSpan = newTRElem - .getElementsByClassName("bz_attach_extra_info")[0]; + .getElementsByClassName("bz_attach_extra_info")[0]; sizeSpan.textContent = "(" + (newAttSize / 1024).toFixed(2) - + " KB, text/plain)"; + + " KB, text/plain)"; // aElements[1].textContent = new Date().toString(); TODO we should add // eventually, but not pressing @@ -135,7 +135,7 @@ function addNewAttachmentRow(origAtt, newAttId, newAttSize) { vcardAElem.setAttribute("href", "mailto:" + this.login); vcardAElem.className = "email"; vcardAElem.innerHTML = "<span class='fn'>" + this.login - + "</span>"; + + "</span>"; } var elem = newTRElem.querySelector("td:last-of-type"); @@ -148,7 +148,7 @@ function addNewAttachmentRow(origAtt, newAttId, newAttSize) { /** * Add a link to create a new attachment with a parsed backtrace - * + * * @param oldAtt * Object with an attachment row * @param snippet diff --git a/data/lib/otherButtons.js b/data/lib/otherButtons.js index 507a3b3..060ce16 100644 --- a/data/lib/otherButtons.js +++ b/data/lib/otherButtons.js @@ -4,7 +4,7 @@ /** * Set background color of all comments made by reporter in ReporterColor color - * + * */ function checkComments() { var reporter = getReporter(); @@ -28,7 +28,7 @@ function collectComments() { /** * Find default assignee based on the current component - * + * * @return String what would be a default assignee if we haven't set it up. */ function getDefaultAssignee() { @@ -38,7 +38,7 @@ function getDefaultAssignee() { /** * Set default assignee - * + * * @return none sets this.defaultAssignee property according to defaultAssignee * list */ @@ -63,7 +63,8 @@ function markBugTriaged() { if (hasXorgBugsCategory && !hasXorgBugsCategory()) { alert("This won't do! First set the category!"); } - else if (isEnterprise && !isEnterprise() && (getSeverity() == 'unspecified')) { + else if (isEnterprise && !isEnterprise() + && (getSeverity() == 'unspecified')) { alert("This won't do! Specify some severity!"); } else { @@ -73,7 +74,7 @@ function markBugTriaged() { var FillMagicDoneRE = new RegExp("^\\s*\\[[0-9a-zA-Z_]*\\]"); -function addingEmbelishments(list) { +function addingEmbelishments(logList) { var maintCCAddr = ""; if (constantData.CCmaintainer) { @@ -127,7 +128,7 @@ function addingEmbelishments(list) { /** * Set branding colours to easily distinguish between Fedora and RHEL bugs - * + * * @param brand * String with product of the current bug * @param version diff --git a/data/lib/queries.js b/data/lib/queries.js index 52c6ce6..066991e 100644 --- a/data/lib/queries.js +++ b/data/lib/queries.js @@ -13,7 +13,7 @@ function getSelection() { /** * Opens a new tab with a query for the given text in the selected component - * + * * @param text * to be searched for * @param component @@ -22,7 +22,7 @@ function getSelection() { * (optional) string with the product name, if undefined, search in all * products * @return None - * + * */ function queryInNewTab(text, component, product, equivComps) { var urlStr = "https://" + window.location.hostname @@ -55,7 +55,7 @@ function queryInNewTab(text, component, product, equivComps) { + text; urlStr += searchText; self.postMessage(new Message("OpenURLinTab", urlStr)); // utils.js is - // always avaiulable + // always avaiulable } } @@ -80,7 +80,7 @@ function queryForSelection() { } /** - * + * */ function queryUpstreamCallback(text, queryUpBug) { var searchData = filterByRegexp(queryUpBug, getComponent()); @@ -99,7 +99,7 @@ function queryUpstreamCallback(text, queryUpBug) { /** * Search simple query in the upstream bugzilla appropriate for the component - * + * * @return none */ function queryUpstream(qUpBug) { diff --git a/data/lib/util.js b/data/lib/util.js index 1c3e607..92b9436 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -1,5 +1,5 @@ -/*global console: false */ -/*jslint onevar: false */ +/* global console: false */ +/* jslint onevar: false */ // Released under the MIT/X11 license // http://www.opensource.org/licenses/mit-license.php "use strict"; @@ -7,14 +7,14 @@ /** * parse URL to get its parts. - * + * * @param url * @return object with all parsed parts of URL as properties - * + * * Originally from * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ Copyright * February 19th, 2009, James Padolsey, <license undeclared> - * + * * This function creates a new anchor element and uses location properties * (inherent) to get the desired URL data. Some String operations are used (to * normalize results across browsers). @@ -30,8 +30,8 @@ function parseURL(url) { query: a.search, params: (function(){ var ret = {}, - seg = a.search.replace(/^\?/,'').split('&'), - len = seg.length, i = 0, s; + seg = a.search.replace(/^\?/,'').split('&'), + len = seg.length, i = 0, s; for (;i<len;i++) { if (!seg[i]) { continue; } s = seg[i].split('='); @@ -50,7 +50,7 @@ function parseURL(url) { /** * parse XML object out of string working around various bugs in Gecko * implementation see https://developer.mozilla.org/en/E4X for more information - * + * * @param inStr * String with unparsed XML string * @return XML object @@ -60,7 +60,7 @@ function parseXMLfromString (inStuff) { // this.response // and get just .text property out of it. TODO var respStr = inStuff.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug - // 336551 + // 336551 return new XML(respStr); } @@ -74,7 +74,7 @@ function getBugNo() { /** * Get a bug no from URL ... fails with aliases - * + * * @param url * String with URL to be analyzed * @return String with the bug ID @@ -88,7 +88,7 @@ function getBugNoFromURL(url) { /** * Send mouse click to the specified element - * + * * @param String * ID of the element to send mouseclick to * @return None @@ -103,7 +103,7 @@ function clickMouse (targetID) { /** * Create a A element leadink nowhere, but with listener running a callback on * the click - * + * * @param id * String with a id to be added to the element * @param text @@ -173,10 +173,10 @@ function createDeadLink (id, text, parent, callback, params, before, covered, ac * From <a> element diggs out just plain email address Note that * bugzilla.gnome.org doesn't have mailto: url but * https://bugzilla.gnome.org/page.cgi?id=describeuser.html&login=mcepl%40redhat.com - * + * * @param aElement Element with href attribute or something else @return String * with the address or null - * + * */ function parseMailto(aElement) { var emailStr = "", hrefStr = ""; @@ -196,7 +196,7 @@ function parseMailto(aElement) { /** * format date to be in ISO format (just day part) - * + * * @param date * @return string with the formatted date */ @@ -206,13 +206,13 @@ function getISODate(dateStr) { } var date = new Date(dateStr); return date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' + - pad(date.getDate()); + pad(date.getDate()); } /** * Check whether an item is member of the list. Idea is just to make long if * commands slightly more readable. - * + * * @param mbr * string to be searched in the list * @param list @@ -228,23 +228,23 @@ function isInList(mbr, list) { /** * Make sure value returned is Array - * + * * @param Array/String * @return Array - * + * * If something else than Array or String is passed to the function the result * will be untouched actual argument of the call. */ function valToArray(val) { var isArr = val && - val.constructor && - val.constructor.name === "Array"; + val.constructor && + val.constructor.name === "Array"; return isArr ? val : [val]; } /** * Merges two comma separated string as a list and returns new string - * + * * @param str * String with old values * @param value @@ -268,7 +268,7 @@ function addCSVValue(str, value) { /** * Treats comma separated string as a list and removes one item from it - * + * * @param str * String treated as a list * @param value @@ -288,7 +288,7 @@ function removeCSVValue(str, value) { /** * select element of the array where regexp in the first element matches second * parameter of this function - * + * * @param list * Array with regexps and return values * @param chosingMark @@ -312,7 +312,7 @@ function filterByRegexp(list, chosingMark) { /** * remove elements from the page based on their IDs - * + * * @param doc * Document object * @param target @@ -339,19 +339,19 @@ function killNodes(doc, target, remove) { /** * Remove duplicate elements from array - * + * * @param arr * Array which needs to be cleaned up * @return cleaned up array */ function removeDuplicates (arr) { for (var i = 0; i < arr.length; i++) { - for (var j = i + 1; j < arr.length; j++) { - if (arr[i] == arr[j]) { - arr.splice (j, 1); + for (var j = i + 1; j < arr.length; j++) { + if (arr[i] == arr[j]) { + arr.splice (j, 1); + } } } - } return arr; } @@ -361,12 +361,12 @@ function removeDuplicates (arr) { * Message("GetPassword", { login: login, hostname: location.hostname })); */ function Message(cmd, data) { - this.cmd = cmd; - this.data = data; + this.cmd = cmd; + this.data = data; } function log(msg) { - self.postMessage(new Message("LogMessage", msg)); + self.postMessage(new Message("LogMessage", msg)); } var NotLoggedinException = function NotLoggedinException (message) { |