mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-10-04 01:10:43 -04:00
Keep the last 8 bold
This commit is contained in:
1 parent
82e25314f3
commit
9315433cb1
1 file changed
+8
-1
@@ -18,7 +18,14 @@ async function handleCopy(event) {
|
||||
|
||||
// 5. Reset after 2 seconds
|
||||
setTimeout(() => {
|
||||
link.innerText = originalText;
|
||||
// Check if the text is long enough to prevent errors
|
||||
if (originalText.length >= 8) {
|
||||
const firstPart = originalText.slice(0, -8);
|
||||
const lastEight = originalText.slice(-8);
|
||||
link.innerHTML = `${firstPart}<b>${lastEight}</b>`;
|
||||
} else {
|
||||
link.innerText = originalText;
|
||||
}
|
||||
link.style.color = "";
|
||||
}, 2000);
|
||||
|
||||
|
||||
Reference in new issue
Block a user