aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/jumpNextBug.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 13:28:55 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-04-28 18:26:14 +0200
commit32af48e442a960b8c3f199f5ffad28a34590fcda (patch)
treec291cb97627bd2cfb65167347261d5ef8f521bfd /data/lib/jumpNextBug.js
parent2382ba19afc84e9b747a7981ebf72aaa704f08b6 (diff)
downloadbugzilla-triage-32af48e442a960b8c3f199f5ffad28a34590fcda.tar.gz
Reformatting to MoFo coding style
Diffstat (limited to 'data/lib/jumpNextBug.js')
-rw-r--r--data/lib/jumpNextBug.js44
1 files changed, 25 insertions, 19 deletions
diff --git a/data/lib/jumpNextBug.js b/data/lib/jumpNextBug.js
index 76e6657..b777fe8 100644
--- a/data/lib/jumpNextBug.js
+++ b/data/lib/jumpNextBug.js
@@ -4,40 +4,46 @@
(function createRelationElements() {
var relation = {};
- var linkLabels = ["First", "Last", "Prev", "Next"];
+ var linkLabels = [
+ "First", "Last", "Prev", "Next"
+ ];
var labelToRelation = {
- "First": {
- rel: "start"
+ "First" : {
+ rel : "start"
},
- "Last": {
- rel: "last"
+ "Last" : {
+ rel : "last"
},
- "Prev": {
- rel: "prev"
+ "Prev" : {
+ rel : "prev"
},
- "Next": {
- rel: "next"
+ "Next" : {
+ rel : "next"
}
};
- function createLinkRel (rel, href) {
+ function createLinkRel(rel, href) {
var newLinkElement = document.createElement("link");
newLinkElement.setAttribute("rel", rel);
newLinkElement.setAttribute("href", href);
- document.getElementsByTagName("head")[0].
- appendChild(newLinkElement);
+ document.getElementsByTagName("head")[0]
+ .appendChild(newLinkElement);
}
- var aNavigElements = document.querySelectorAll("#bugzilla-body .navigation a");
+ var aNavigElements = document
+ .querySelectorAll("#bugzilla-body .navigation a");
Array.forEach(aNavigElements, function(elem) {
- var labelText = elem.textContent.trim();
- if (isInList(labelText, linkLabels)) {
- labelToRelation[labelText].href = elem.getAttribute("href");
- };
+ var labelText = elem.textContent.trim();
+ if (isInList(labelText, linkLabels)) {
+ labelToRelation[labelText].href = elem
+ .getAttribute("href");
+ }
+ ;
});
- console.myDebug("labelToRelation = " + labelToRelation.toSource());
+ console.myDebug("labelToRelation = "
+ + labelToRelation.toSource());
- for (var key in labelToRelation) {
+ for ( var key in labelToRelation) {
if (labelToRelation.hasOwnProperty(key)) {
relation = labelToRelation[key];
if (relation.href) {