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

Compare commits

..

2 commits

Author SHA1 Message Date
e6eed2dd70
build: Bumped version to 5.4.6 2024-11-07 19:35:42 -06:00
37a5300015
fix: Disable copying to clipboard on WebKit, fixes #36
This disables clipboard copying and lets the user
manually copy the links.
2024-11-07 19:33:34 -06:00
3 changed files with 9 additions and 6 deletions

8
actix/Cargo.lock generated
View file

@ -1070,9 +1070,9 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.161" version = "0.2.162"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398"
[[package]] [[package]]
name = "libsqlite3-sys" name = "libsqlite3-sys"
@ -1606,9 +1606,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.41.0" version = "1.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",

View file

@ -3,7 +3,7 @@
[package] [package]
name = "chhoto-url" name = "chhoto-url"
version = "5.4.5" version = "5.4.6"
edition = "2021" edition = "2021"
authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"] authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"]
license = "mit" license = "mit"

View file

@ -103,7 +103,10 @@ const TR = (row, site) => {
const tr = document.createElement("tr"); const tr = document.createElement("tr");
const longTD = TD(A_LONG(row["longlink"]), "Long URL"); const longTD = TD(A_LONG(row["longlink"]), "Long URL");
var shortTD = null; 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"); shortTD = TD(A_SHORT(row["shortlink"], site), "Short URL");
} }
else { else {