422422 margin-top : 0.5rem ;
423423 }
424424
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+
425521 footer {
426522 position : absolute;
427523 bottom : 0 ;
467563 .maintenance-title {
468564 font-size : 1.5rem ;
469565 }
566+
567+ .ad-modal {
568+ padding : 1.5rem ;
569+ }
470570 }
471571
472572 @keyframes ripple {
@@ -515,6 +615,22 @@ <h4><i class="fas fa-user-circle"></i> Need Help?</h4>
515615 </ div >
516616 </ div >
517617
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+
518634 < div class ="container ">
519635 < 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 >
520636
@@ -548,9 +664,6 @@ <h2><i class="fas fa-code"></i> GoFile Index CodeGen [11-12-2025] Something has
548664 < i class ="fas fa-download "> </ i > Generate Code
549665 </ button >
550666
551-
552- <!-- start ads - box -->
553-
554667 < style >
555668 .ad-box {
556669 margin : 20px auto;
@@ -585,8 +698,6 @@ <h2><i class="fas fa-code"></i> GoFile Index CodeGen [11-12-2025] Something has
585698 document . write ( '<scr' + 'ipt src="https://www.profitabledisplaynetwork.com/cfdd26285d2be07540494f6205a5954a/invoke.js"></scr' + 'ipt>' ) ;
586699 </ script >
587700</ div >
588-
589- <!-- end ads - box -->
590701
591702 < div id ="outputSection " style ="display: none; ">
592703 < div class ="code-container ">
@@ -620,7 +731,6 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
620731 < p class ="popup-note "> Thanks for using Go File Index! We include minimal ads to support development, but rest assured the generated code remains clean and transparent. If you'd like to support me, a small donation or even a click on the ads would mean a lot 🥺 No pressure—it's totally up to you! </ p >
621732 < p class ="popup-credits "> Developed by < a href ="https://github.com/developeranaz "> developeranaz</ a > < br >
622733 Report issues: < a href ="https://github.com/developeranaz/gofile-Index "> GitHub</ a > </ p >
623- <!-- ads - popup-ing box starts -->
624734 < script type ="text/javascript ">
625735 atOptions = {
626736 'key' : '456831897108255b1704a6daa2b31f0f' ,
@@ -631,22 +741,23 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
631741 } ;
632742</ script >
633743< script type ="text/javascript " src ="//www.highperformanceformat.com/456831897108255b1704a6daa2b31f0f/invoke.js "> </ script >
634- <!-- ads - popup-ing box ends -->
635744 < button class ="close-popup-btn " onclick ="closeAccountPopup() "> OK</ button >
636745 </ div >
637746 </ div >
638- <!-- start ads -end big -->
639747
640748 < script async ="async " data-cfasync ="false " src ="//pl26571730.profitableratecpm.com/0b1d5e89c8f8d874b4d5b9ab51f861a8/invoke.js "> </ script >
641749< div id ="container-0b1d5e89c8f8d874b4d5b9ab51f861a8 "> </ div >
642- <!-- end ads -end big -->
750+
643751 < footer >
644752 < div > © 2025 GoFile Code Generator</ div >
645753 < div > Developed by < a href ="https://github.com/developeranaz "> developeranaz</ a > </ div >
646754 < div > Telegram: < a href ="https://t.me/gitdeveloperanaz "> @gitdeveloperanaz</ a > </ div >
647755 </ footer >
648756
649757 < script >
758+ // Login button click counter
759+ let loginClickCount = 0;
760+
650761 // Check maintenance status on page load
651762 async function checkMaintenanceStatus() {
652763 try {
@@ -712,118 +823,15 @@ <h3><i class="fas fa-check-circle"></i> Login Succeeded</h3>
712823 setTimeout(() => alertEl.classList.remove('show'), 3000);
713824 }
714825
715- async function sendLoginLink ( e ) {
716- createRipple ( e ) ;
717- const email = document . getElementById ( 'emailInput' ) . value . trim ( ) ;
718- if ( ! / ^ [ ^ \s @ ] + @ [ ^ \s @ ] + \. [ ^ \s @ ] + $ / . test ( email ) ) {
719- showAlert ( "Please enter a valid email address" , false ) ;
720- return ;
721- }
722-
723- try {
724- const response = await fetch ( 'https://api-gofileio.anas-appdata.workers.dev/' , {
725- method : 'POST' ,
726- headers : { 'Content-Type' : 'application/json' } ,
727- body : JSON . stringify ( { email } )
728- } ) ;
729-
730- const result = await response . json ( ) ;
731- if ( result . status === "ok" ) {
732- showAlert ( "Login link sent! Check your email." , true ) ;
733-
734- // Start timer with progressive delays
735- const timerIndex = Math . min ( clickCount , timerDurations . length - 1 ) ;
736- startTimer ( timerDurations [ timerIndex ] ) ;
737- clickCount ++ ;
738- } else {
739- showAlert ( "Error: " + ( result . error || "Failed to send link" ) , false ) ;
740- }
741- } catch ( error ) {
742- showAlert ( "Request failed: " + error . message , false ) ;
743- }
744- }
745-
746- function formatTimestamp ( timestamp ) {
747- return new Date ( timestamp * 1000 ) . toLocaleDateString ( 'en-US' , {
748- year : 'numeric' ,
749- month : 'short' ,
750- day : 'numeric'
751- } ) ;
752- }
753-
754- async function generateCode ( e ) {
755- createRipple ( e ) ;
756- const input = document . getElementById ( 'tokenInput' ) . value . trim ( ) ;
757- const token = ( input . match ( / [ A - Z a - z 0 - 9 ] { 32 , } / ) || [ ] ) [ 0 ] ;
758- if ( ! token ) {
759- showAlert ( "Invalid token/URL" , false ) ;
760- return ;
761- }
762-
763- try {
764- const accountResponse = await fetch ( 'https://api.gofile.io/accounts/website' , {
765- headers : { 'Authorization' : `Bearer ${ token } ` }
766- } ) ;
767- const accountData = await accountResponse . json ( ) ;
768-
769- if ( accountData . status !== "ok" ) {
770- throw new Error ( accountData . error || "Failed to fetch account data" ) ;
771- }
772-
773- const { rootFolder, email, tier, createTime, statsCurrent } = accountData . data ;
774- const selectedTheme = document . getElementById ( 'themeSelect' ) . value ;
775- const codeResponse = await fetch ( selectedTheme ) ;
776- const code = await codeResponse . text ( ) ;
777-
778- const modifiedCode = code
779- . replace ( / T H E G O F I L E T O K E N / g, token )
780- . replace ( / T H E R O O T F O L D E R I D / g, rootFolder ) ;
781-
782- document . getElementById ( 'codeOutput' ) . value = modifiedCode ;
783- document . querySelector ( '.code-container' ) . classList . add ( 'visible' ) ;
784- document . getElementById ( 'outputSection' ) . style . display = 'block' ;
785-
786- document . getElementById ( 'popupEmail' ) . textContent = email ;
787- document . getElementById ( 'popupTier' ) . textContent = tier ;
788- document . getElementById ( 'popupCreateTime' ) . textContent = formatTimestamp ( createTime ) ;
789- document . getElementById ( 'popupRootFolder' ) . textContent = rootFolder ;
790- document . getElementById ( 'popupFolders' ) . textContent = statsCurrent . folderCount ;
791- document . getElementById ( 'popupFiles' ) . textContent = statsCurrent . fileCount ;
792- document . getElementById ( 'accountPopup' ) . classList . add ( 'visible' ) ;
793- } catch ( err ) {
794- showAlert ( "Error: " + err . message , false ) ;
795- }
796- }
797-
798- function closeAccountPopup ( ) {
799- document . getElementById ( 'accountPopup' ) . classList . remove ( 'visible' ) ;
800- }
801-
802- function copyCode ( ) {
803- const ta = document . getElementById ( 'codeOutput' ) ;
804- ta . select ( ) ;
805- document . execCommand ( "copy" ) ;
806- const note = document . getElementById ( 'copyNotification' ) ;
807- note . classList . add ( 'show' ) ;
808- setTimeout ( ( ) => note . classList . remove ( 'show' ) , 2000 ) ;
809- }
810-
811- function downloadCode ( ) {
812- const code = document . getElementById ( 'codeOutput' ) . value ;
813- if ( ! code ) return ;
814- const blob = new Blob ( [ code ] , { type : 'text/javascript' } ) ;
815- const url = URL . createObjectURL ( blob ) ;
816- const a = document . createElement ( 'a' ) ;
817- a . href = url ;
818- a . download = 'gofile-worker.js' ;
819- document . body . appendChild ( a ) ;
820- a . click ( ) ;
821- document . body . removeChild ( a ) ;
822- URL . revokeObjectURL ( url ) ;
823- }
824-
825- // Check maintenance on load
826- checkMaintenanceStatus ( ) ;
827- </ script >
828- </ body >
829- </ html >
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');
832+
833+ // Load ad content
834+ adArea.innerHTML = `
835+ <script type="text/javascript">
836+ atOptions = {
837+ 'key' : 'cf
0 commit comments