Skip to content

Commit

Permalink
Merge pull request vfarid#56 from X-Oracle/Panel
Browse files Browse the repository at this point in the history
[Panel] Improve subscription Link generator.
  • Loading branch information
vfarid authored May 11, 2024
2 parents cadb8df + a0e330b commit a353aa2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ export async function GetPanel(request: Request, env: Env): Promise<Response> {
${htmlMessage}
<div class="px-4 py-2 bg-light">
<label id="sub-link-title" for="sub-link" class="form-label fw-bold"></label>
<input id="sub-link" readonly value="https://${url.hostname}/sub" class="p-1" style="width: calc(100% - 150px)">
<input id="sub-link" readonly value="${url.origin}/sub" class="p-1" style="width: calc(100% - 150px)">
<button onclick="var tmp=document.getElementById('sub-link');tmp.select();tmp.setSelectionRange(0,99999);navigator.clipboard.writeText(tmp.value)" class="btn btn-primary p-1 mb-1">Copy</button>
</div>
<div class="px-4 py-2 bg-light">
<label id="clash-link-title" for="clash-link" class="form-label fw-bold"></label>
<input id="clash-link" readonly value="https://${url.hostname}/clash" class="p-1" style="width: calc(100% - 150px)">
<input id="clash-link" readonly value="${url.origin}/clash" class="p-1" style="width: calc(100% - 150px)">
<button onclick="var tmp=document.getElementById('clash-link');tmp.select();tmp.setSelectionRange(0,99999);navigator.clipboard.writeText(tmp.value)" class="btn btn-primary p-1 mb-1">Copy</button>
</div>
<form class="px-4 py-4 border-top border-2 border-primary" method="post">
Expand Down Expand Up @@ -445,12 +445,12 @@ export async function GetPanel(request: Request, env: Env): Promise<Response> {
</div>
<div class="px-5 py-2 bg-light">
<label id="sub-link-title" for="sub-link" class="form-label fw-bold"></label>
<input id="sub-link" readonly value="https://${url.hostname}/sub" class="p-1" style="width: calc(100% - 150px)">
<input id="sub-link" readonly value="${url.origin}/sub" class="p-1" style="width: calc(100% - 150px)">
<button onclick="var tmp=document.getElementById('sub-link');tmp.select();tmp.setSelectionRange(0,99999);navigator.clipboard.writeText(tmp.value)" class="btn btn-primary p-1 mb-1">Copy</button>
</div>
<div class="px-5 py-2 bg-light">
<label id="clash-link-title" for="clash-link" class="form-label fw-bold"></label>
<input id="clash-link" readonly value="https://${url.hostname}/clash" class="p-1" style="width: calc(100% - 150px)">
<input id="clash-link" readonly value="${url.origin}/clash" class="p-1" style="width: calc(100% - 150px)">
<button onclick="var tmp=document.getElementById('clash-link');tmp.select();tmp.setSelectionRange(0,99999);navigator.clipboard.writeText(tmp.value)" class="btn btn-primary p-1 mb-1">Copy</button>
</div>
<div id="you-can-use-your-worker-message" class="mx-5 my-2 p-4 border bg-success text-white fw-bold text-center"></div>
Expand Down

0 comments on commit a353aa2

Please sign in to comment.