Skip to content

Commit

Permalink
Merge pull request #135 from acdh-oeaw/excerpt-link-new-tab
Browse files Browse the repository at this point in the history
Open links in new window
  • Loading branch information
gythaogg authored Sep 30, 2024
2 parents f710c40 + 917a3c5 commit 29515fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis_ontology/static/scripts/show_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ let behaviors = {
// Hyperlink the rs tag and include type and ref in its title
"rs": function(e) {
let result = document.createElement("a");
// make link open in a new page
result.setAttribute("target", "_BLANK");
result.setAttribute("href", "/apis/apis_ontology."+e.getAttribute("type")+"/"+e.getAttribute("ref").split(":")[1]);
result.setAttribute("title", "type: " + e.getAttribute("type") + ", id: " + e.getAttribute("ref"));
for (let n of Array.from(e.childNodes)) {
Expand Down

0 comments on commit 29515fa

Please sign in to comment.