Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
Update for removing backlinks.
  • Loading branch information
ducnc1201 committed Mar 3, 2024
1 parent 6d621a0 commit 22c141f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
return [...word].join('឴');
}


function processText() {
let inputBox = document.getElementById("inputBox");
let outputBox = document.getElementById("outputBox");
Expand All @@ -64,7 +65,15 @@

// Remove anchor tags and keep only text content
const anchorRegex = /<a\b[^>]*>(.*?)<\/a>/gi;
htmlContent = htmlContent.replace(anchorRegex, '$1');
htmlContent = htmlContent.replace(anchorRegex, function(match, p1) {
// Remove the "href" attribute from anchor tags with the class name "link-inline-content"
if (match.includes('class="link-inline-content"')) {
return `<span>${p1}</span>`; // Replace anchor tag with span to keep text content
} else {
return p1; // Keep the original text content if it's not a link with the specified class
}
});


// Find words containing 'bca' and replace 'bca' with 'b឴ca'
const wordRegex = /\b\w*bca\w*\b/gi;
Expand Down

0 comments on commit 22c141f

Please sign in to comment.