(node, iconColor, appendNode)
| 277 | } |
| 278 | |
| 279 | function addCustomBtn(node, iconColor, appendNode) { |
| 280 | // add download button and set event handlers |
| 281 | // add newtab button |
| 282 | let newtabBtn = createCustomBtn( |
| 283 | svgNewtabBtn, |
| 284 | iconColor, |
| 285 | "newtab-btn", |
| 286 | "16px" |
| 287 | ); |
| 288 | appendNode(node, newtabBtn); |
| 289 | |
| 290 | // add download button |
| 291 | let downloadBtn = createCustomBtn( |
| 292 | svgDownloadBtn, |
| 293 | iconColor, |
| 294 | "download-btn", |
| 295 | "14px" |
| 296 | ); |
| 297 | appendNode(node, downloadBtn); |
| 298 | |
| 299 | if (prefetchAndAttachLink) { |
| 300 | onMouseInHandler({ currentTarget: newtabBtn }); |
| 301 | onMouseInHandler({ currentTarget: downloadBtn }); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | function createCustomBtn(svg, iconColor, className, marginLeft) { |
| 306 | let newBtn = document.createElement("a"); |
no test coverage detected