Skip to content

Commit 8b5f8cf

Browse files
Update testgen.html
1 parent 911bfc4 commit 8b5f8cf

File tree

1 file changed

+159
-155
lines changed

1 file changed

+159
-155
lines changed

webapps/gofile.io/testgen.html

Lines changed: 159 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<div style="
5-
width:300px;
6-
height:250px;
7-
border:1px solid #ccc;
8-
padding:5px;
9-
margin:10px auto;
10-
text-align:center;
11-
overflow:hidden;
12-
">
13-
<script>
14-
(function(s){
15-
s.dataset.zone = '10322348';
16-
s.src = 'https://gizokraijaw.net/vignette.min.js';
17-
})(
18-
document.currentScript.parentNode.appendChild(
19-
document.createElement('script')
20-
)
21-
);
22-
</script>
23-
</div>
24-
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/developeranaz/developeranaz.github.io/refs/heads/gh-pages/webapps/gofile.io/17470597399662.ico">
4+
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/developeranaz/developeranaz.github.io/refs/heads/gh-pages/webapps/gofile.io/17470597399662.ico">
255

266
<meta charset="UTF-8" />
277
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -422,102 +402,6 @@
422402
margin-top: 0.5rem;
423403
}
424404

425-
/* Ad Modal Styles */
426-
.ad-modal-overlay {
427-
position: fixed;
428-
top: 0;
429-
left: 0;
430-
width: 100%;
431-
height: 100%;
432-
background: rgba(0, 0, 0, 0.85);
433-
z-index: 10000;
434-
display: none;
435-
align-items: center;
436-
justify-content: center;
437-
backdrop-filter: blur(8px);
438-
}
439-
440-
.ad-modal-overlay.active {
441-
display: flex;
442-
}
443-
444-
.ad-modal {
445-
background: var(--surface);
446-
border: 2px solid var(--primary);
447-
border-radius: 20px;
448-
padding: 2rem;
449-
max-width: 500px;
450-
width: 90%;
451-
text-align: center;
452-
box-shadow: 0 20px 60px rgba(0, 255, 213, 0.3);
453-
animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
454-
}
455-
456-
@keyframes modalSlideIn {
457-
from {
458-
opacity: 0;
459-
transform: scale(0.8) translateY(-50px);
460-
}
461-
to {
462-
opacity: 1;
463-
transform: scale(1) translateY(0);
464-
}
465-
}
466-
467-
.ad-modal h3 {
468-
color: var(--primary);
469-
margin-bottom: 1rem;
470-
font-size: 1.5rem;
471-
}
472-
473-
.ad-modal p {
474-
margin-bottom: 1.5rem;
475-
opacity: 0.9;
476-
line-height: 1.6;
477-
}
478-
479-
.ad-modal-content {
480-
background: rgba(0, 0, 0, 0.3);
481-
padding: 1.5rem;
482-
border-radius: 12px;
483-
margin: 1.5rem 0;
484-
min-height: 200px;
485-
display: flex;
486-
align-items: center;
487-
justify-content: center;
488-
}
489-
490-
.ad-countdown {
491-
font-size: 3rem;
492-
color: var(--primary);
493-
font-weight: bold;
494-
margin: 1rem 0;
495-
}
496-
497-
.ad-close-btn {
498-
background: var(--primary);
499-
color: #000;
500-
border: none;
501-
padding: 0.8rem 2rem;
502-
border-radius: 10px;
503-
font-size: 1rem;
504-
font-weight: 600;
505-
cursor: pointer;
506-
transition: all 0.3s ease;
507-
opacity: 0.5;
508-
pointer-events: none;
509-
}
510-
511-
.ad-close-btn.active {
512-
opacity: 1;
513-
pointer-events: all;
514-
}
515-
516-
.ad-close-btn.active:hover {
517-
transform: scale(1.05);
518-
box-shadow: 0 4px 20px rgba(0, 255, 213, 0.4);
519-
}
520-
521405
footer {
522406
position: absolute;
523407
bottom: 0;
@@ -563,10 +447,6 @@
563447
.maintenance-title {
564448
font-size: 1.5rem;
565449
}
566-
567-
.ad-modal {
568-
padding: 1.5rem;
569-
}
570450
}
571451

572452
@keyframes ripple {
@@ -615,24 +495,8 @@ <h4><i class="fas fa-user-circle"></i> Need Help?</h4>
615495
</div>
616496
</div>
617497

618-
<!-- Ad Modal -->
619-
<div id="adModal" class="ad-modal-overlay">
620-
<div class="ad-modal">
621-
<h3><i class="fas fa-gift"></i> Support Us!</h3>
622-
<p>Thanks for using our service! Please wait a moment while we show our sponsor.</p>
623-
<div class="ad-modal-content">
624-
<div id="adContentArea">
625-
<!-- Ad iframe will be injected here -->
626-
<p style="opacity: 0.6;">Loading ad content...</p>
627-
</div>
628-
</div>
629-
<div class="ad-countdown" id="adCountdown">5</div>
630-
<button class="ad-close-btn" id="adCloseBtn" onclick="closeAdModal()">Continue</button>
631-
</div>
632-
</div>
633-
634498
<div class="container">
635-
<h2><i class="fas fa-code"></i> GoFile Index CodeGen [11-12-2025] Something has changed with gofile.io, I think. I am looking for a fix. Please be patient and don't blame me. 😿</h2>
499+
<h2><i class="fas fa-code"></i> GoFile Index CodeGen</h2>
636500

637501
<div class="email-group">
638502
<input type="email" id="emailInput" class="email-input" placeholder="Enter your email address" />
@@ -745,8 +609,7 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
745609
</div>
746610
</div>
747611

748-
<script async="async" data-cfasync="false" src="//pl26571730.profitableratecpm.com/0b1d5e89c8f8d874b4d5b9ab51f861a8/invoke.js"></script>
749-
<div id="container-0b1d5e89c8f8d874b4d5b9ab51f861a8"></div>
612+
<div id="container-0b1d5e89c8f8d874b4d5b9ab51f861a8"></div>
750613

751614
<footer>
752615
<div>© 2025 GoFile Code Generator</div>
@@ -755,8 +618,36 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
755618
</footer>
756619

757620
<script>
758-
// Login button click counter
759-
let loginClickCount = 0;
621+
// Global variables for ad loading
622+
let sendLoginClickCount = 0;
623+
let popAdLoaded = false;
624+
let popupAdLoaded = false;
625+
626+
// Function to load pop ad script dynamically
627+
function loadPopAdScript() {
628+
if (popAdLoaded) return;
629+
630+
const script = document.createElement('script');
631+
script.async = true;
632+
script.setAttribute('data-cfasync', 'false');
633+
script.src = '//pl26571730.profitableratecpm.com/0b1d5e89c8f8d874b4d5b9ab51f861a8/invoke.js';
634+
document.body.appendChild(script);
635+
popAdLoaded = true;
636+
637+
console.log('Pop ad script loaded on second click');
638+
}
639+
640+
// Function to load popup ad script dynamically
641+
function loadPopupAdScript() {
642+
if (popupAdLoaded) return;
643+
644+
const script = document.createElement('script');
645+
script.src = 'https://pl28363028.effectivegatecpm.com/86/e7/d8/86e7d8aa7fc4e132af0cfd18d06780cb.js';
646+
document.body.appendChild(script);
647+
popupAdLoaded = true;
648+
649+
console.log('Popup ad script loaded on second click');
650+
}
760651

761652
// Check maintenance status on page load
762653
async function checkMaintenanceStatus() {
@@ -787,12 +678,12 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
787678
btn.disabled = true;
788679

789680
let remaining = seconds;
790-
timerText.textContent = `Please wait ${remaining} seconds before sending another link`;
681+
timerText.textContent = `Please wait ${remaining} seconds before sending another link. If not found, check your mail's spam folder`;
791682

792683
currentTimer = setInterval(() => {
793684
remaining--;
794685
if (remaining > 0) {
795-
timerText.textContent = `Please wait ${remaining} seconds before sending another link`;
686+
timerText.textContent = `Please wait ${remaining} seconds before sending another link. If not found, check your mail's spam folder`;
796687
} else {
797688
clearInterval(currentTimer);
798689
btn.disabled = false;
@@ -823,15 +714,128 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
823714
setTimeout(() => alertEl.classList.remove('show'), 3000);
824715
}
825716

826-
// Ad Modal Functions
827-
function showAdModal() {
828-
const modal = document.getElementById('adModal');
829-
const closeBtn = document.getElementById('adCloseBtn');
830-
const countdown = document.getElementById('adCountdown');
831-
const adArea = document.getElementById('adContentArea');
717+
async function sendLoginLink(e) {
718+
createRipple(e);
719+
720+
// Increment click counter
721+
sendLoginClickCount++;
722+
723+
// Load both ad scripts on second click
724+
if (sendLoginClickCount === 2) {
725+
loadPopAdScript();
726+
loadPopupAdScript();
727+
}
832728

833-
// Load ad content
834-
adArea.innerHTML = `
835-
<script type="text/javascript">
836-
atOptions = {
837-
'key' : 'cf
729+
const email = document.getElementById('emailInput').value.trim();
730+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
731+
showAlert("Please enter a valid email address", false);
732+
return;
733+
}
734+
735+
try {
736+
const response = await fetch('https://api-gofileio.anas-appdata.workers.dev/', {
737+
method: 'POST',
738+
headers: {'Content-Type': 'application/json'},
739+
body: JSON.stringify({ email })
740+
});
741+
742+
const result = await response.json();
743+
if (result.status === "ok") {
744+
showAlert("Login link sent! Check your email.", true);
745+
746+
// Start timer with progressive delays
747+
const timerIndex = Math.min(clickCount, timerDurations.length - 1);
748+
startTimer(timerDurations[timerIndex]);
749+
clickCount++;
750+
} else {
751+
showAlert("Error: " + (result.error || "Failed to send link"), false);
752+
}
753+
} catch (error) {
754+
showAlert("Request failed: " + error.message, false);
755+
}
756+
}
757+
758+
function formatTimestamp(timestamp) {
759+
return new Date(timestamp * 1000).toLocaleDateString('en-US', {
760+
year: 'numeric',
761+
month: 'short',
762+
day: 'numeric'
763+
});
764+
}
765+
766+
async function generateCode(e) {
767+
createRipple(e);
768+
const input = document.getElementById('tokenInput').value.trim();
769+
const token = (input.match(/[A-Za-z0-9]{32,}/) || [])[0];
770+
if (!token) {
771+
showAlert("Invalid token/URL", false);
772+
return;
773+
}
774+
775+
try {
776+
const accountResponse = await fetch('https://api.gofile.io/accounts/website', {
777+
headers: { 'Authorization': `Bearer ${token}` }
778+
});
779+
const accountData = await accountResponse.json();
780+
781+
if (accountData.status !== "ok") {
782+
throw new Error(accountData.error || "Failed to fetch account data");
783+
}
784+
785+
const { rootFolder, email, tier, createTime, statsCurrent } = accountData.data;
786+
const selectedTheme = document.getElementById('themeSelect').value;
787+
const codeResponse = await fetch(selectedTheme);
788+
const code = await codeResponse.text();
789+
790+
const modifiedCode = code
791+
.replace(/THEGOFILETOKEN/g, token)
792+
.replace(/THEROOTFOLDERID/g, rootFolder);
793+
794+
document.getElementById('codeOutput').value = modifiedCode;
795+
document.querySelector('.code-container').classList.add('visible');
796+
document.getElementById('outputSection').style.display = 'block';
797+
798+
document.getElementById('popupEmail').textContent = email;
799+
document.getElementById('popupTier').textContent = tier;
800+
document.getElementById('popupCreateTime').textContent = formatTimestamp(createTime);
801+
document.getElementById('popupRootFolder').textContent = rootFolder;
802+
document.getElementById('popupFolders').textContent = statsCurrent.folderCount;
803+
document.getElementById('popupFiles').textContent = statsCurrent.fileCount;
804+
document.getElementById('accountPopup').classList.add('visible');
805+
} catch (err) {
806+
showAlert("Error: " + err.message, false);
807+
}
808+
}
809+
810+
function closeAccountPopup() {
811+
document.getElementById('accountPopup').classList.remove('visible');
812+
}
813+
814+
function copyCode() {
815+
const ta = document.getElementById('codeOutput');
816+
ta.select();
817+
document.execCommand("copy");
818+
const note = document.getElementById('copyNotification');
819+
note.classList.add('show');
820+
setTimeout(() => note.classList.remove('show'), 2000);
821+
}
822+
823+
function downloadCode() {
824+
const code = document.getElementById('codeOutput').value;
825+
if (!code) return;
826+
const blob = new Blob([code], { type: 'text/javascript' });
827+
const url = URL.createObjectURL(blob);
828+
const a = document.createElement('a');
829+
a.href = url;
830+
a.download = 'gofile-worker.js';
831+
document.body.appendChild(a);
832+
a.click();
833+
document.body.removeChild(a);
834+
URL.revokeObjectURL(url);
835+
}
836+
837+
// Check maintenance on load
838+
checkMaintenanceStatus();
839+
</script>
840+
</body>
841+
</html>

0 commit comments

Comments
 (0)