feat: incorporate multiple upstream prs
All checks were successful
Docker / build-and-push-image (push) Successful in 1m35s

https://github.com/t3dotgg/unduck/pull/24 and https://github.com/t3dotgg/unduck/pull/13
This commit is contained in:
Troy 2025-04-19 14:29:08 +01:00
parent 7d61d8f879
commit a4a4d619f3
Signed by: troy
GPG key ID: DFC06C02ED3B4711
4 changed files with 456 additions and 33 deletions

429
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,12 +12,10 @@
"update": "npx npm-check-updates -u && npm install" "update": "npx npm-check-updates -u && npm install"
}, },
"devDependencies": { "devDependencies": {
"npm-check-updates": "^17.1.15", "npm-check-updates": "^17.1.18",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"typescript": "~5.8.2", "typescript": "~5.8.3",
"vite": "^6.2.0" "vite": "^6.3.2",
}, "vite-plugin-pwa": "^1.0.0"
"dependencies": {
"vite-plugin-pwa": "^0.21.1"
} }
} }

View file

@ -40,6 +40,7 @@ h6 {
a { a {
color: #444444; color: #444444;
} }
a:hover { a:hover {
color: #888888; color: #888888;
} }
@ -127,3 +128,48 @@ textarea {
.footer a:hover { .footer a:hover {
color: #333; color: #333;
} }
@media (prefers-color-scheme: dark) {
body {
color: #ddd;
}
#app {
background-color: #131313;
}
a {
color: #a9a9a9;
}
a:hover {
color: #888;
}
.footer,
.footer a {
color: #999;
}
.footer a:hover {
color: #ccc;
}
.url-input {
border-color: #3d3d3d;
background-color: #191919;
color: #fff;
}
.copy-button img {
filter: invert(1);
}
.copy-button:hover {
background: #222;
}
.copy-button:active {
background: #333;
}
}

View file

@ -80,6 +80,10 @@ function getBangredirectUrl() {
// Remove the first bang from the query // Remove the first bang from the query
const cleanQuery = query.replace(/!\S+\s*/i, "").trim(); const cleanQuery = query.replace(/!\S+\s*/i, "").trim();
// If the query is just `!gh`, use `github.com` instead of `github.com/search?q=`
if (cleanQuery === "")
return selectedBang ? `https://${selectedBang.d}` : null;
// Format of the url is: // Format of the url is:
// https://www.google.com/search?q={{{s}}} // https://www.google.com/search?q={{{s}}}
const searchUrl = selectedBang?.u.replace( const searchUrl = selectedBang?.u.replace(