Skip to content

Commit

Permalink
Merge pull request #7 from bentleycook/bentley/add-json-files
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek authored Sep 12, 2024
2 parents 305a2f8 + 2064b69 commit 8b4724d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions open_in_new_tab/js/open_in_new_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function pdf_new_window ()
}
let links = document.getElementsByTagName("a");
for (let eleLink=0; eleLink < links.length; eleLink ++) {
if ((links[eleLink].href.indexOf('.pdf') !== -1)||(links[eleLink].href.indexOf('.doc') !== -1)||(links[eleLink].href.indexOf('.docx') !== -1)) {
if ((links[eleLink].href.indexOf('.pdf') !== -1)||(links[eleLink].href.indexOf('.doc') !== -1)||(links[eleLink].href.indexOf('.json') !== -1)||(links[eleLink].href.indexOf('.docx') !== -1)) {
links[eleLink].onclick =
function() {
window.open(this.href);
Expand All @@ -42,4 +42,4 @@ if (typeof document$ !== "undefined") {
document$.subscribe(function() {
apply_rules();
})
}
}

0 comments on commit 8b4724d

Please sign in to comment.