Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: ${{ env.REGISTRY }}/${{ github.repository }}
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func main() {
URL: basePath + "/favicon.ico",
}))

if os.Getenv("NOLOGS") != "true" {
if os.Getenv("NOLOGS") != "true" && os.Getenv("LOG_URLS") != "false" {
app.Use(func(c *fiber.Ctx) error {
log.Println(c.Method(), c.Path())

Expand Down
17 changes: 15 additions & 2 deletions handlers/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ <h1 class="text-center text-3xl sm:text-4xl font-extrabold text-slate-900 tracki
<div>
<input type="url" id="inputField" placeholder="Proxy Search" name="inputField" class="w-full text-sm leading-6 text-slate-400 rounded-md ring-1 ring-slate-900/10 shadow-sm py-1.5 pl-2 pr-3 hover:ring-slate-300 dark:bg-slate-800 dark:highlight-white/5 dark:hover:bg-slate-700" required autofocus>
<button id="clearButton" type="button" aria-label="Clear Search" title="Clear Search" class="hidden absolute inset-y-0 right-0 items-center pr-2 hover:text-slate-400 hover:dark:text-slate-300" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round""><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
</button>
</div>
<button type="button" id="pasteButton" class="mt-2 w-full sm:hidden rounded-md bg-blue-600 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600">Paste &amp; Go</button>
</form>
<footer class="mt-10 mx-4 text-center text-slate-600 dark:text-slate-400">
<p>
Expand Down Expand Up @@ -58,6 +59,18 @@ <h1 class="text-center text-3xl sm:text-4xl font-extrabold text-slate-900 tracki
this.style.display = 'none';
document.getElementById('inputField').focus();
});
document.getElementById('pasteButton').addEventListener('click', async function() {
try {
const text = await navigator.clipboard.readText();
document.getElementById('inputField').value = text;
if (text.indexOf('http') === -1) {
text = 'https://' + text;
}
window.location.href = window.location.pathname.replace(/\/$/, '') + '/' + text;
} catch (err) {
// Clipboard access denied or not available
}
});
</script>

<style>
Expand All @@ -77,4 +90,4 @@ <h1 class="text-center text-3xl sm:text-4xl font-extrabold text-slate-900 tracki
</style>
</body>

</html>
</html>