Skip to content

Commit

Permalink
EEB 14/15: Review - use full doi links for sharing and citing
Browse files Browse the repository at this point in the history
  • Loading branch information
kiri-diaconu committed Dec 8, 2023
1 parent cf6c828 commit 61e9aa2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/components/highlights/list-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default {
return this.article.doi + '#rev0-ar'
},
copyFullUrlToClipboard () {
navigator.clipboard.writeText(window.location.host + this.generateInternalUrl);
navigator.clipboard.writeText(this.getFullStandaloneDoiUrl);
},
copyCitationToClipboard () {
navigator.clipboard.writeText(this.citationText);
Expand Down Expand Up @@ -199,11 +199,11 @@ export default {
}
return `/doi/${this.article.doi}`
},
getFullStandaloneUrl() {
return window.location.host + this.generateInternalUrl
getFullStandaloneDoiUrl() {
return `${window.location.host}/doi/${this.article.doi}`
},
getTweetHref() {
let tweetContent = this.getFullStandaloneUrl
let tweetContent = this.getFullStandaloneDoiUrl
let fullLink = "https://twitter.com/intent/tweet?text=" + tweetContent
return fullLink
},
Expand All @@ -213,7 +213,7 @@ export default {
const reviewedByText = this.article.reviewed_by.map(r => "peer reviewed by " + serviceId2Name(r)).join(", ")
let citationText = `${this.authorList} (${year}). ${this.article.title}. ${this.article.journal} ${this.article.doi}, ${reviewedByText} ${this.getFullStandaloneUrl}.`
let citationText = `${this.authorList} (${year}). ${this.article.title}. ${this.article.journal} doi.org/${this.article.doi}, ${reviewedByText} ${this.getFullStandaloneDoiUrl}.`
return citationText
}
},
Expand Down

0 comments on commit 61e9aa2

Please sign in to comment.