random & support ukraine
This commit is contained in:
parent
f5255b51ae
commit
37e6f2e949
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Mail;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
|
|
|
|||
|
|
@ -121,10 +121,13 @@
|
|||
|
||||
<button id="saveBtn" class="btn btn-primary btn-save" style="margin-right: 5px;"
|
||||
type="button">修改邮箱</button>
|
||||
<input type="hidden" value="" id="mailToCopy">
|
||||
<button id="genBtn" class="btn btn-success" style="margin-right: 5px;"
|
||||
type="button">更换邮箱</button>
|
||||
|
||||
<input type="hidden" value="" id="mailToCopy">
|
||||
<button id="copyBtn" class="btn btn-info copy-btn" data-clipboard-target="#mailToCopy"
|
||||
type="button">复制邮箱</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
|
|
@ -162,11 +165,15 @@
|
|||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<a href="https://github.com/996icu/996.ICU/blob/master/LICENSE"><img
|
||||
src="https://img.shields.io/badge/license-Anti%20996-blue.svg" alt="996 license" /></a>
|
||||
<span class="text-muted">© 2023 临时邮箱. All rights reserved.</span>
|
||||
|
||||
<span class="text-muted">© 2023-{{date('Y')}} 临时邮箱. All rights reserved.</span>
|
||||
<a href="https://996.icu"><img src="https://img.shields.io/badge/link-996.icu-red.svg"
|
||||
alt="996.icu" /></a>
|
||||
<a href="https://github.com/996icu/996.ICU/blob/master/LICENSE"><img
|
||||
src="https://img.shields.io/badge/license-Anti%20996-blue.svg" alt="996 license" /></a>
|
||||
<a href="https://github.com/support-ukraine/support-ukraine">
|
||||
<img src="https://bit.ly/support-ukraine-now" alt="Support Ukraine Badge" />
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
@ -266,6 +273,16 @@ function fetchMail() {
|
|||
}
|
||||
}
|
||||
|
||||
function generateRandomString(length) {
|
||||
var result = '';
|
||||
var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
var charactersLength = characters.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.ajaxSetup({
|
||||
|
|
@ -369,10 +386,15 @@ function fetchMail() {
|
|||
$(this).hide();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#saveBtn').click();
|
||||
|
||||
|
||||
$('#genBtn').click(function () {
|
||||
let randomStr = generateRandomString(8);
|
||||
$('#prefixInput').val(randomStr);
|
||||
$('#saveBtn').click();
|
||||
});
|
||||
|
||||
fetchMail();
|
||||
var countdownTimer = setInterval(function () {
|
||||
if (isRequestPending) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user