Skip to content

Commit

Permalink
Merge pull request #544 from WWWPiramalFinanceCOM/feature/optimization
Browse files Browse the repository at this point in the history
Feature/optimization
  • Loading branch information
VaibhavSasulkar authored Oct 11, 2024
2 parents bdcd27f + 9cf0a80 commit a3aa20b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
13 changes: 0 additions & 13 deletions component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,19 +611,6 @@
"value": "",
"label": "Offer documents image",
"description": "Sets the image of the documents."
},
{
"component": "multiselect",
"name": "multiselect",
"label": "Rel Added",
"valueType": "string",
"options": [
{ "name": "noopener", "value": "noopener" },
{ "name": "noreferrer", "value": "noreferrer" },
{ "name": "nofollow", "value": "nofollow" },
{ "name": "dofollow", "value": "dofollow" },
{ "name": "noindex", "value": "noindex" }
]
}
]
},
Expand Down
10 changes: 10 additions & 0 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,16 @@ export function decorateAnchorTag(main) {
});
});
}

// Rel Tags
if(anchor.textContent.trim().includes("~")){
let mainAnchor = anchor.textContent.trim().split('~');
anchor.innerText = mainAnchor[0];
anchor.setAttribute('title', mainAnchor[0]);
let relTags = mainAnchor[1].replace(',', " ");
anchor.setAttribute('rel', relTags);
}

});
} catch (error) {
console.warn(error);
Expand Down

0 comments on commit a3aa20b

Please sign in to comment.