1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-24 23:18:35 -06:00

fix: Disable copying to clipboard on WebKit, fixes #36

This disables clipboard copying and lets the user
manually copy the links.
This commit is contained in:
Sayantan Santra 2024-11-07 19:33:34 -06:00
parent 66d94634d9
commit 37a5300015
Signed by: SinTan1729
GPG key ID: 0538DD402EA50898

View file

@ -103,7 +103,10 @@ const TR = (row, site) => {
const tr = document.createElement("tr");
const longTD = TD(A_LONG(row["longlink"]), "Long URL");
var shortTD = null;
if (window.isSecureContext) {
var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
// For now, we disable copying on WebKit due to a possible bug. Manual copying is enabled instead.
// Take a look at https://github.com/SinTan1729/chhoto-url/issues/36
if (window.isSecureContext && !(isSafari)) {
shortTD = TD(A_SHORT(row["shortlink"], site), "Short URL");
}
else {