add open in a new tab
This commit is contained in:
parent
9033c5c13d
commit
1714c06979
1 changed files with 8 additions and 1 deletions
|
@ -129,7 +129,14 @@ const blobifyPdfs = () => {
|
|||
};
|
||||
|
||||
base64ToBlob(item.src.split(",")[1]).then((blob) => {
|
||||
item.src = URL.createObjectURL(blob);
|
||||
const newUrl = URL.createObjectURL(blob);
|
||||
item.src = newUrl;
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = newUrl;
|
||||
link.target = "_blank";
|
||||
link.textContent = "Ouvrir le PDF dans un nouvel onglet";
|
||||
item.insertAdjacentElement("afterend", link);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue