Skip to content

Commit

Permalink
Merge pull request Checkmarx#7154 from Checkmarx/docs/add-urls-to-all…
Browse files Browse the repository at this point in the history
…-queries-download

fix(docs): add urls to all queries download
  • Loading branch information
JulioSCX authored Jun 26, 2024
2 parents ce3cbd0 + f5afba4 commit bb12f3c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,29 @@ function exportToCSV(filename) {
if (headerArray[j] == "query") {
text = "Query ID,Query Name"
}
if (headerArray[j] == "more info") {
text = "Query Details,Documentation"
}
} else if (headerArray[j] == "help") {
text = cols[j].children[0].href
} else if (headerArray[j] == "query") {
var lastIndex = text.lastIndexOf(" ")
text = `"${text.substring(lastIndex + 1)},${text.substring(0, lastIndex)}"`
} else if (headerArray[j] == "description") {
text = text.replace(/\(read more\)/i, '')
} else if (headerArray[j] == "more info") {
let elements = cols[j].getElementsByTagName('a')

let urls = {
'Documentation': "-",
'Query details': "-"
}

for (let element of elements) {
urls[element.innerText] = element.href
}

text = urls['Query details'] + "," + urls['Documentation']
}
row.push(text)
}
Expand Down

0 comments on commit bb12f3c

Please sign in to comment.