Skip to content

Commit

Permalink
cvurrent year
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Jan 3, 2025
1 parent ebc214e commit ee690a1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,16 @@ qx.Class.define("osparc.product.Utils", {
const copyrightLink = new osparc.ui.basic.LinkLabel();
const vendor = osparc.store.VendorInfo.getInstance().getVendor();
if (vendor && "url" in vendor && "copyright" in vendor) {
let copyrightText = vendor.copyright;
// remove the copyright symbol (©)
copyrightText = copyrightText.replace("©", "");
copyrightText = copyrightText.trim();
// remove the year
copyrightText = copyrightText.replace(/^\d+\s/, "");
// add the copyright symbol (©) and current year
copyrightText = ${new Date().getFullYear()} ` + copyrightText;
copyrightLink.set({
value: vendor.copyright,
value: copyrightText,
url: vendor.url
});
return copyrightLink;
Expand Down

0 comments on commit ee690a1

Please sign in to comment.