Български | Català | Deutsche | Hrvatski | Čeština | Dansk | Nederlandse | English | Eesti keel | Français | Ελληνικά | Magyar | Italiano | Latviski | Norsk | Polski | Português | Română | Русский | Српски | Slovenský | Slovenščina | Español | Svenska | Türkçe | 汉语 | 日本語 |
P

www html

Aktiv sætning
Opdateringsdato for information: 2026/03/29
Søgeforespørgselsfrekvens
72481
Sætningsdefinition
ukendt
Oversæt sætninger
www html, www-html, www_html, wwww html, www. html

www html Artikel

📝

Forstå det grundlæggende i www HTML: En omfattende vejledning

Velkommen til et dybt dyk ned i webudviklingens verden, hvor hver linje kode kan omdanne almindelig tekst til dynamiske, interaktive websteder. I dag fokuserer vi på nettets rygrad –www HTML. Uanset om du er helt nybegynder eller frisker op på dine færdigheder, vil denne guide give dig et solidt fundament i HTML, og hvordan det passer ind i det større billede af webdesign.

Hvad er HTML?

HTML, som står for HyperText Markup Language, er det primære sprog, der bruges til at oprette websider. Det giver en grundlæggende struktur, som browsere fortolker for at vise indhold på internettet. Hvert websted, du besøger, starter som HTML-kode, hvilket gør det til en grundlæggende færdighed for alle, der er interesseret i webudvikling.

Www HTMLs rolle

Du undrer dig måske over, hvorfor vi specifikt nævner www HTML. Selvom "www"-delen typisk ikke er nødvendig i moderne webadresser, var den engang afgørende. World Wide Web (WWW) er i bund og grund et system af indbyrdes forbundne hypertekstdokumenter, der tilgås via internettet. HTML er det sprog, der bruges til at oprette disse dokumenter.

I dagens sammenhæng understreger det at nævne www HTML HTMLs historiske betydning og grundlæggende rolle i skabelsen af internettet. Det minder os om, at HTML er mere end bare kode – det er internettets sprog.

Grundlæggende HTML-struktur

Lad os tage et kig på den grundlæggende struktur i et HTML-dokument:



    
        Sidetitel
    
    
        

Min første overskrift

Mit første afsnit.

  • : Erklærer dokumenttypen og -versionen af HTML.
  • : Rodelementet på en HTML-side.
  • : Indeholder metaoplysninger om HTML-dokumentet, såsom dets titel og links til stylesheets.
  • </strong>: Indstiller titlen på websiden, som vises på browserfanen.</li> <li><strong><body></strong>: Indeholder indholdet af HTML-dokumentet, der er synligt for brugerne.</li> <li><strong><h1></strong>: Definerer en overskrift på øverste niveau.</li> <li><strong><p></strong>: Repræsenterer et tekstafsnit.</li> </ul> <h2>Oprettelse af tekstelementer med www HTML</h2> <p>HTML giver forskellige tags til at skabe forskellige typer tekstelementer. Her er nogle eksempler:</p> <ul> <li><strong><h1>-<h6></strong>: Definer overskrifter fra største til mindste.</li> <li><strong><p></strong>: Opretter tekstafsnit.</li> <li><strong><a></strong>: Indsætter hyperlinks til andre websider eller ressourcer.</li> <li><strong><em></strong> og <strong><strong></strong>: Fremhæv tekst med <strong><em></strong> typisk gengivet i kursiv og <strong><strong></strong> med fed skrift.</li> <li><strong><br></strong>: Indsætter et linjeskift.</li> </ul> <h3>Eksempel: Oprettelse af et simpelt link</h3> <pre> <a href="https://www.serpulse.com">Besøg Serpulse</a> </pre> <p>Denne kode opretter et klikbart link til Serpulse-webstedet. Attributten <strong>href</strong> angiver den URL, som linket peger på.</p> <h2>Tilføjelse af billeder med www HTML</h2> <p>At inkorporere billeder på dine websider forbedrer deres visuelle appel og brugeroplevelse. For at tilføje et billede ved hjælp af HTML, bruger du tagget <strong><img></strong>:</p> <pre> <img src="path/to/image.jpg" alt="Beskrivelse af billede"> </pre> <ul> <li><strong>src</strong>: Angiver stien til billedfilen.</li> <li><strong>alt</strong>: Giver alternativ tekst til skærmlæsere, og når billedet ikke kan vises.</li> </ul> <h2>Oprettelse af lister med www HTML</h2> <p>Lister er afgørende for at organisere oplysninger på dit websted. HTML understøtter både ordnede og uordnede lister:</p> <h3>Uordnet liste</h3> <pre> <ul> <li>Første element</li> <li>Andet element</li> <li>Tredje element</li> </ul> </pre> <h3>Bestilt liste</h3> <pre> <ol> <li>Første trin</li> <li>Andet trin</li> <li>Tredje trin</li> </ol> </pre> <h2>Tabeller i www HTML</h2> <p>HTML giver dig også mulighed for at oprette tabeller til visning af tabeldata:</p> <pre> <tabel> <tr> <th>Overskrift 1</th> <th>Overskrift 2</th> </tr> <tr> <td>Række 1, celle 1</td> <td>Række 1, celle 2</td> </tr> <tr><td>Række 2, celle 1</td> <td>Række 2, celle 2</td> </tr> </table> </pre> <ul> <li><strong><tabel></strong>: Definerer tabellen.</li> <li><strong><tr></strong>: Definerer en tabelrække.</li> <li><strong><th></strong>: Definerer en overskriftscelle i en tabel.</li> <li><strong><td></strong>: Definerer en standarddatacelle i en tabel.</li> </ul> <h2>Formularer i www HTML</h2> <p>Formularer er afgørende for at indsamle brugerinput. Her er et grundlæggende eksempel på en HTML-formular:</p> <pre> <form action="/submit-form" method="post"> <label for="name">Navn:</label> <input type="text" id="name" name="name"><br><br> <label for="email">E-mail:</label> <input type="email" id="email" name="email"><br><br> <input type="submit" value="Send"> </form> </pre> <ul> <li><strong><form></strong>: Opretter en HTML-formular til brugerinput.</li> <li><strong>handling</strong>: Angiver, hvor formulardataene skal sendes, når de indsendes.</li> <li><strong>metode</strong>: Definerer den HTTP-metode, der skal bruges (GET eller POST).</li> <li><strong><label></strong>: Giver etiketter til inputfelter.</li> <li><strong><input></strong>: Opretter forskellige typer input-elementer, såsom tekstfelter og knapper.</li> </ul> <h2>Styling med CSS</h2> <p>Mens HTML giver strukturen på dine websider, er CSS (Cascading Style Sheets) ansvarlig for deres udseende. Du kan linke en CSS-fil til dit HTML-dokument ved hjælp af <strong><link></strong>-tagget i <strong><head></strong>-sektionen:</p> <pre> <link rel="stylesheet" href="styles.css"> </pre> <p>Alternativt kan du inkludere CSS direkte i din HTML ved hjælp af <strong><style></strong>-tagget:</p> <pre> <stil> krop { baggrundsfarve: lyseblå; } h1 { farve: marineblå; margin-venstre: 20px; } </style> </pre> <h2>JavaScript til interaktivitet</h2> <p>For at tilføje interaktivitet til dine websider kan du bruge JavaScript. Selvom det ikke er en del af HTML selv, fungerer JavaScript sammen med HTML og CSS for at skabe dynamiske brugeroplevelser. Her er et simpelt eksempel på indlejring af JavaScript i et HTML-dokument:</p> <pre> <script> funktion showMessage() { alert("Hej verden!"); } </script> <button onclick="showMessage()">Klik på mig!</button> </pre> <h2>Konklusion</h2> <p>I denne omfattende vejledning har vi udforsket det grundlæggende i <strong>www HTML</strong>, fra dets rolle i World Wide Web til at skabe komplekse elementer som tabeller og formularer. Ved at forstå HTML er du godt på vej til at bygge professionelt udseende websites, der engagerer og informerer dit publikum.</p> <p>Husk, at lære HTML kun er begyndelsen på din rejse til webudvikling. Mens du mestrer HTML, så glem ikke at dykke ned i CSS til styling og JavaScript for interaktivitet. God kodning!</p> <p>For flere ressourcer og selvstudier, besøg <a href="https://www.serpulse.com">Serpulse</a>.</p> <p><em>Forfatter: Serpulse.com</em></p> <p><em>Søgeord: www html, HTML grundlæggende, webudvikling, webdesign, HTML-struktur, HTML-tags, HTML-tekstelementer, HTML-billeder, HTML-lister, HTML-tabeller, HTML-formularer, CSS, JavaScript</em></p> ``` nedsættelse Denne artikel giver et detaljeret overblik over HTML, dets betydning, og hvordan det passer ind i den bredere kontekst af webudvikling. Det dækker grundlæggende begreber og praktiske eksempler, hvilket gør det til en fremragende ressource for både begyndere og erfarne udviklere, der ønsker at genopfriske deres viden. Inkluderingen af ​​specifikke HTML-tags og kodestykker sikrer klarhed og praktiske læringsmuligheder. ```</p> </div> </div> <!-- Words Definitions --> <!-- Search Engine Positions --> <!-- Chart Container --> <div class="chart-container"> <h2 class="chart-title">Stillinger i Google</h2> <div id="chart_div_google" style="width: 100%; height: 400px;"></div> </div> <div class="card"> <div class="card-header"> <h2 class="card-title">Søgesætninger - Google</h2> <div class="card-icon">🔍</div> </div> <div class="card-content"> <div class="filters"> <div class="filter-group"> <label class="filter-label" for="googlePhraseFilter">Domæne:</label> <input type="text" id="googleDomainFilter" class="filter-input" placeholder="Filtrer efter domæne"> </div> <div class="filter-group"> <label class="filter-label" for="googlePageFilter">Side:</label> <input type="text" id="googlePageFilter" class="filter-input" placeholder="Filtrer efter side"> </div> <div class="filter-group"> <label class="filter-label"> </label> <button class="cta-button" onclick="applyPhraseFilters('google')">Anvend filter</button> </div> </div> <!-- Update the table structure to include show page functionality --> <div class="table-responsive"> <table class="data-table" id="googleDomainsTable"> <thead> <tr> <th>Position</th> <th>Domæne</th> <th>Side</th> <th>Handlinger</th> </tr> </thead> <tbody id="googlePhrasesBody"> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 1 </span> </td> <td> <a href="/da/domain/www.w3schools.com/" > www.w3schools.com </a> </td> <td>/html/</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-1"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://www.w3schools.com/html/" class="page-url" target="_blank" rel="nofollow"> https://www.w3schools.com/html/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML Tutorial </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://www.w3schools.com/html/" rel="nofollow" target="_blank">HTML Tutorial</a></noindex><br>HTML is the standard markup language for Web pages. With HTML you can create your own Website. HTML is easy to learn - You will enjoy it! </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 2 </span> </td> <td> <a href="/da/domain/html.com/" > html.com </a> </td> <td>/</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-2"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://html.com/" class="page-url" target="_blank" rel="nofollow"> https://html.com/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML For Beginners The Easy Way </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://html.com/" rel="nofollow" target="_blank">HTML For Beginners The Easy Way</a></noindex><br>Our step-by-step guide teaches you the basics of HTML and how to build your first website. That means how to layout an HTML page, how to add text and images , ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 3 </span> </td> <td> <a href="/da/domain/qna.habr.com/" > qna.habr.com </a> </td> <td>/q/695506</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-3"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://qna.habr.com/q/695506" class="page-url" target="_blank" rel="nofollow"> https://qna.habr.com/q/695506 </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Как сменить document_root apache с /var/www/html на /var ... </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://qna.habr.com/q/695506" rel="nofollow" target="_blank">Как сменить document_root apache с /var/www/html на /var ...</a></noindex><br>23 дек. 2019 г. — Как сменить document_root apache с /var/ www/html на /var/www/test/ html /public? Есть vps, на нем apache и php. из различных статей пробовал ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 4 </span> </td> <td> <a href="/da/domain/developer.mozilla.org/" > developer.mozilla.org </a> </td> <td>/ru/docs/web/html;19...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-4"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://developer.mozilla.org/ru/docs/web/html;19299901" class="page-url" target="_blank" rel="nofollow"> https://developer.mozilla.org/ru/docs/web/html;19299901 </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML - MDN Web Docs - Mozilla </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://developer.mozilla.org/ru/docs/web/html;19299901" rel="nofollow" target="_blank">HTML - MDN Web Docs - Mozilla</a></noindex><br>15 апр. 2025 г. — HTML (HyperText Markup Language — «язык гипертекстовой разметки») — самый базовый строительный блок Веба. Он определяет содержание и ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 5 </span> </td> <td> <a href="/da/domain/stackoverflow.com/" > stackoverflow.com </a> </td> <td>/questions/16197663/...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-5"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://stackoverflow.com/questions/16197663/what-is-var-www-html" class="page-url" target="_blank" rel="nofollow"> https://stackoverflow.com/questions/16197663/what-is-var-www-html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> What is /var/www/html? [closed] - php </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://stackoverflow.com/questions/16197663/what-is-var-www-html" rel="nofollow" target="_blank">What is /var/www/html? [closed] - php</a></noindex><br>/ var/www/html is just the default root folder of the web server. You can change that to be whatever folder you want by editing your apache.conf file. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 6 </span> </td> <td> <a href="/da/domain/htmlacademy.ru/" > htmlacademy.ru </a> </td> <td>/</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-6"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://htmlacademy.ru/" class="page-url" target="_blank" rel="nofollow"> https://htmlacademy.ru/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML Academy </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://htmlacademy.ru/" rel="nofollow" target="_blank">HTML Academy</a></noindex><br>Готовим разработчиков напрямую для работодателей . Получите базовые навыки на тренажёрах, а затем пройдите серьёзные профессиональные программы для ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 7 </span> </td> <td> <a href="/da/domain/ru.wikipedia.org/" > ru.wikipedia.org </a> </td> <td>/wiki/html;4107130</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-7"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://ru.wikipedia.org/wiki/html;4107130" class="page-url" target="_blank" rel="nofollow"> https://ru.wikipedia.org/wiki/html;4107130 </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://ru.wikipedia.org/wiki/html;4107130" rel="nofollow" target="_blank">HTML</a></noindex><br>HTML (от англ. HyperText Markup Language — «язык гипертекстовой разметки») — стандартизированный язык гипертекстовой разметки документов для просмотра веб- ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 8 </span> </td> <td> <a href="/da/domain/www.linux.org.ru/" > www.linux.org.ru </a> </td> <td>/forum/general/88885...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-8"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://www.linux.org.ru/forum/general/8888584" class="page-url" target="_blank" rel="nofollow"> https://www.linux.org.ru/forum/general/8888584 </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Помогите разобраться с apache и /var/www/index.html </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://www.linux.org.ru/forum/general/8888584" rel="nofollow" target="_blank">Помогите разобраться с apache и /var/www/index.html</a></noindex><br>24 февр. 2013 г. — вообщем главная страница в любом случае должна быть /var/www/index. html ? а остальные страницы где угодно, только чтоб в папке /var/www? </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 9 </span> </td> <td> <a href="/da/domain/htmlbook.ru/" > htmlbook.ru </a> </td> <td>/</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-9"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://htmlbook.ru/" class="page-url" target="_blank" rel="nofollow"> https://htmlbook.ru/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Home | htmlbook.ru </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://htmlbook.ru/" rel="nofollow" target="_blank">Home | htmlbook.ru</a></noindex><br>Аудио и видео. Семантический HTML . Каждый урок сопровождается задачами, которые надо решать прямиком в редакторе. Курс бесплатный, для изучения требуется только ... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 10 </span> </td> <td> <a href="/da/domain/html.spec.whatwg.org/" > html.spec.whatwg.org </a> </td> <td>/</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-google-10"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://html.spec.whatwg.org/" class="page-url" target="_blank" rel="nofollow"> https://html.spec.whatwg.org/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML Standard;5302519 </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://html.spec.whatwg.org/" rel="nofollow" target="_blank">HTML Standard;5302519</a></noindex><br>HTML is the World Wide Web's core markup language. Originally, HTML was primarily designed as a language for semantically describing scientific documents. Its ...;60549698 </div> </div> </td> </tr> </tbody> </table> </div> <div class="pagination" id="googlePagination"> <button disabled onclick="loadSearchDomains('google', 0)">«</button> <button class="active" onclick="loadSearchDomains('google', 1)">1</button> <button disabled onclick="loadSearchDomains('google', 2)">»</button> </div> </div> </div> <script> google.charts.load('current', { 'packages': ['corechart', 'line'], 'callback': drawChart_google}); function drawChart_google() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Dag'); data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html"); data.addRows([ [new Date(2011, 1, 11),null,3,null,null,null,null,null,null,11,null,],[new Date(2025, 11, 8),1,2,3,4,5,6,7,8,9,10,],[new Date(2025, 4, 24),null,3,2,4,9,5,6,null,21,23,],[new Date(2025, 5, 25),null,4,2,3,null,5,8,null,6,null,],[new Date(2025, 6, 25),null,2,6,3,10,5,8,null,4,7,], ]); var options = { chart: { title: 'Topdomæner i google søgeresultater for sætning: "www html"', subtitle: 'Domænepositionshistorik' }, width: '100%', height: 400, curveType: 'function', legend: { position: 'bottom' }, pointSize: 5, pointsVisible: true, interpolateNulls: true, selectionMode: 'multiple', vAxis: { direction: '-1', title: 'Position', }, hAxis: { title: 'Dato', }, }; var chart = new google.visualization.LineChart(document.getElementById("chart_div_google")); chart.draw(data, options); } </script> <!-- Chart Container --> <div class="chart-container"> <h2 class="chart-title">Stillinger i Yandex</h2> <div id="chart_div_yandex" style="width: 100%; height: 400px;"></div> </div> <div class="card"> <div class="card-header"> <h2 class="card-title">Søgesætninger - Yandex</h2> <div class="card-icon">🔍</div> </div> <div class="card-content"> <div class="filters"> <div class="filter-group"> <label class="filter-label" for="yandexPhraseFilter">Domæne:</label> <input type="text" id="yandexDomainFilter" class="filter-input" placeholder="Filtrer efter domæne"> </div> <div class="filter-group"> <label class="filter-label" for="yandexPageFilter">Side:</label> <input type="text" id="yandexPageFilter" class="filter-input" placeholder="Filtrer efter side"> </div> <div class="filter-group"> <label class="filter-label"> </label> <button class="cta-button" onclick="applyPhraseFilters('yandex')">Anvend filter</button> </div> </div> <!-- Update the table structure to include show page functionality --> <div class="table-responsive"> <table class="data-table" id="yandexDomainsTable"> <thead> <tr> <th>Position</th> <th>Domæne</th> <th>Side</th> <th>Handlinger</th> </tr> </thead> <tbody id="yandexPhrasesBody"> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 1 </span> </td> <td> <a href="/da/domain/inf.e-alekseev.ru/" > inf.e-alekseev.ru </a> </td> <td>/text/www_html.html</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-1"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://inf.e-alekseev.ru/text/www_html.html" class="page-url" target="_blank" rel="nofollow"> https://inf.e-alekseev.ru/text/www_html.html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> 13.5. WWW и HTML </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://inf.e-alekseev.ru/text/www_html.html" rel="nofollow" target="_blank">13.5. WWW и HTML</a></noindex><br>HTML – это формат гипертекстовых документов, использующихся в WWW для предоставления информации. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 2 </span> </td> <td> <a href="/da/domain/schoolsw3.com/" > schoolsw3.com </a> </td> <td>/html/html_intro.php</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-2"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://schoolsw3.com/html/html_intro.php" class="page-url" target="_blank" rel="nofollow"> https://schoolsw3.com/html/html_intro.php </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Введение в HTML за 5 минут — Как работает HTML ? </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://schoolsw3.com/html/html_intro.php" rel="nofollow" target="_blank">Введение в HTML за 5 минут — Как работает HTML ?</a></noindex><br>Простое объяснение HTML для новичков. Основные понятия, структура документа и примеры кода. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-success"> 3 </span> </td> <td> <a href="/da/domain/oslogic.ru/" > oslogic.ru </a> </td> <td>/knowledge/75/osnovn...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-3"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://oslogic.ru/knowledge/75/osnovnye-ponyatiya-www/" class="page-url" target="_blank" rel="nofollow"> https://oslogic.ru/knowledge/75/osnovnye-ponyatiya-www/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Основные понятия World Wide Web, или WWW </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://oslogic.ru/knowledge/75/osnovnye-ponyatiya-www/" rel="nofollow" target="_blank">Основные понятия World Wide Web, или WWW</a></noindex><br>WWW — (World Wide Web) — это часть Internet, представляющая собой гигантский набор документов, хранящихся на компьютерах по всему миру. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 4 </span> </td> <td> <a href="/da/domain/frolov-lib.ru/" > frolov-lib.ru </a> </td> <td>/books/bsp/v23/ch4_1...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-4"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://frolov-lib.ru/books/bsp/v23/ch4_1.html" class="page-url" target="_blank" rel="nofollow"> https://frolov-lib.ru/books/bsp/v23/ch4_1.html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> 4 создание страниц www </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://frolov-lib.ru/books/bsp/v23/ch4_1.html" rel="nofollow" target="_blank">4 создание страниц www</a></noindex><br>Практическое введение в Internet, E-Mail, FTP, WWW и HTML , программирование для Windows Sockets. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 5 </span> </td> <td> <a href="/da/domain/dzen.ru/" > dzen.ru </a> </td> <td>/a/zgzma5bzlrj7ofll</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-5"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://dzen.ru/a/zgzma5bzlrj7ofll" class="page-url" target="_blank" rel="nofollow"> https://dzen.ru/a/zgzma5bzlrj7ofll </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Основы html - база для всех тех, кто мечтает стать... | Дзен </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://dzen.ru/a/zgzma5bzlrj7ofll" rel="nofollow" target="_blank">Основы html - база для всех тех, кто мечтает стать... | Дзен</a></noindex><br>Подписчиков </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 6 </span> </td> <td> <a href="/da/domain/htmlacademy.ru/" > htmlacademy.ru </a> </td> <td>/blog/html/introduct...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-6"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://htmlacademy.ru/blog/html/introduction-to-html" class="page-url" target="_blank" rel="nofollow"> https://htmlacademy.ru/blog/html/introduction-to-html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Знакомство с HTML — журнал «Доктайп» | HTML Academy </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://htmlacademy.ru/blog/html/introduction-to-html" rel="nofollow" target="_blank">Знакомство с HTML — журнал «Доктайп» | HTML Academy</a></noindex><br>Знакомство с HTML для тех, кто никогда не писал сайты. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 7 </span> </td> <td> <a href="/da/domain/help.sweb.ru/" > help.sweb.ru </a> </td> <td>/html-osnovy-yazyka-...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-7"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://help.sweb.ru/html-osnovy-yazyka-i-bazovaya-struktura_1296.html" class="page-url" target="_blank" rel="nofollow"> https://help.sweb.ru/html-osnovy-yazyka-i-bazovaya-struktura_1296.html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> HTML </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://help.sweb.ru/html-osnovy-yazyka-i-bazovaya-struktura_1296.html" rel="nofollow" target="_blank">HTML </a></noindex><br>Основы HTML - для чего используется этот язык разметки и зачем он нужен; как выглядит код и синтаксис HyperText Markup Language. </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 8 </span> </td> <td> <a href="/da/domain/academy.kgtk.ru/" > academy.kgtk.ru </a> </td> <td>/it3/web-programming...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-8"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://academy.kgtk.ru/it3/web-programming/lecture1.html" class="page-url" target="_blank" rel="nofollow"> https://academy.kgtk.ru/it3/web-programming/lecture1.html </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Лекция 1. Основы World Wide Web ( WWW ) </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://academy.kgtk.ru/it3/web-programming/lecture1.html" rel="nofollow" target="_blank">Лекция 1. Основы World Wide Web ( WWW )</a></noindex><br>В лекции рассмотрены общие принципы организации и функционирования сервиса WWW . Описаны структура и компоненты веб, включая протокол HTTP... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 9 </span> </td> <td> <a href="/da/domain/sky.pro/" > sky.pro </a> </td> <td>/wiki/html/osnovy-ht...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-9"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://sky.pro/wiki/html/osnovy-html-struktura-html-dokumenta/" class="page-url" target="_blank" rel="nofollow"> https://sky.pro/wiki/html/osnovy-html-struktura-html-dokumenta/ </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Основы HTML </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://sky.pro/wiki/html/osnovy-html-struktura-html-dokumenta/" rel="nofollow" target="_blank">Основы HTML </a></noindex><br>Изучите основы HTML и создайте свою первую веб-страницу! В этой статье вы узнаете о ключевых тегах и структуре HTML -документа, научитесь... </div> </div> </td> </tr> <!-- Main result row --> <tr> <td> <span class="badge badge-warning"> 10 </span> </td> <td> <a href="/da/domain/developer.mozilla.org/" > developer.mozilla.org </a> </td> <td>/ru/docs/learn_web_d...</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)"> Vis sidedetaljer </button> </td> </tr> <!-- Page details row --> <tr class="page-details-row"> <td colspan="4"> <div class="page-details" id="page-details-yandex-10"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Fuld URL</div> <div class="page-detail-value"> <a href="https://developer.mozilla.org/ru/docs/learn_web_development/core/structuring_content/basic_html_syntax" class="page-url" target="_blank" rel="nofollow"> https://developer.mozilla.org/ru/docs/learn_web_development/core/structuring_content/basic_html_syntax </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Titel</div> <div class="page-detail-value"> Начало работы с HTML - Изучение веб-разработки | MDN </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sidst opdateret</div> <div class="page-detail-value"> N/A </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Sideautoritet</div> <div class="page-detail-value"> N/A </div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Trafik:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Sociale aktier:</span> <span class="page-metric-value"> N/A </span> </div> <div class="page-metric"> <span class="page-detail-label">Indlæsningstid:</span> <span class="page-metric-value"> N/A </span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Forhåndsvisning af uddrag:</strong><br> <noindex><a href="https://https://developer.mozilla.org/ru/docs/learn_web_development/core/structuring_content/basic_html_syntax" rel="nofollow" target="_blank">Начало работы с HTML - Изучение веб-разработки | MDN</a></noindex><br>В этой статье мы охватим азы HTML , необходимые для начала работы. Дадим определение «элементам», «атрибутам»... </div> </div> </td> </tr> </tbody> </table> </div> <div class="pagination" id="yandexPagination"> <button disabled onclick="loadSearchDomains('yandex', 0)">«</button> <button class="active" onclick="loadSearchDomains('yandex', 1)">1</button> <button disabled onclick="loadSearchDomains('yandex', 2)">»</button> </div> </div> </div> <script> google.charts.load('current', { 'packages': ['corechart', 'line'], 'callback': drawChart_yandex}); function drawChart_yandex() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Dag'); data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html");data.addColumn("number", "www html"); data.addRows([ [new Date(2025, 5, 19),1,2,3,4,5,6,7,8,9,10,], ]); var options = { chart: { title: 'Topdomæner i yandex søgeresultater for sætning: "www html"', subtitle: 'Domænepositionshistorik' }, width: '100%', height: 400, curveType: 'function', legend: { position: 'bottom' }, pointSize: 5, pointsVisible: true, interpolateNulls: true, selectionMode: 'multiple', vAxis: { direction: '-1', title: 'Position', }, hAxis: { title: 'Dato', }, }; var chart = new google.visualization.LineChart(document.getElementById("chart_div_yandex")); chart.draw(data, options); } </script> <!-- Additional Services --> <div class="card"> <div class="card-header"> <h2 class="card-title">Yderligere tjenester</h2> <div class="card-icon">💎</div> </div> <div class="card-content"> <div class="info-grid"> <div class="info-item"> <span class="popup-trigger" alt="Fuld SEO-revision med detaljerede anbefalinger"> <button class="cta-button" data-modal="paymentModal" data-title="Fuld SEO Audit" data-text="Fuld SEO-revision med detaljerede anbefalinger til forbedring af søgemaskinepositioner." data-price="99.99"> Fuld SEO Audit </button> <span class="popup-text"></span> </span> </div> <div class="info-item"> <span class="popup-trigger" alt="Månedlig positionsovervågning for 100 nøglesætninger"> <button class="cta-button" data-modal="paymentModal" data-title="Positionsovervågning" data-text="Månedlig positionsovervågning for 100 nøglesætninger i Google og Yandex." data-price="49.99"> Positionsovervågning </button> <span class="popup-text"></span> </span> </div> <div class="info-item"> <span class="popup-trigger" alt="Konkurrentanalyse og identifikation af deres forfremmelsesstrategier"> <button class="cta-button" data-modal="paymentModal" data-title="Konkurrent Analyse" data-text="Konkurrentanalyse og identifikation af deres forfremmelsesstrategier." data-price="79.99"> Konkurrent Analyse </button> <span class="popup-text"></span> </span> </div> </div> </div> </div> <!-- JavaScript for AJAX Pagination --> <script> // Apply filters function function applyPhraseFilters(engine) { loadSearchDomains(engine, 1); } // Load search domains for phrase function loadSearchDomains(engine, page) { const domainFilter = document.getElementById(engine + 'DomainFilter').value; const pageFilter = document.getElementById(engine + 'PageFilter').value; const phrase_id = document.getElementById('phrase_id').value; const data = { type: 'search_domains', engine: engine, page: page, phrase_id: phrase_id, // Send the phrase domain_filter: domainFilter, page_filter: pageFilter }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { renderSearchDomains(engine, response.data); renderPagination(engine, response.pagination); } else { console.error('Error loading search domains:', response.error); } }); } // Render domain pagination specifically for phrase pages function renderDomainPagination(engine, pagination) { const paginationContainer = document.getElementById(engine + 'Pagination'); paginationContainer.innerHTML = ''; const { current_page, total_pages, has_previous, has_next } = pagination; // Previous button const prevButton = document.createElement('button'); prevButton.innerHTML = '«'; prevButton.disabled = !has_previous; prevButton.addEventListener('click', () => { if (has_previous) loadSearchDomains(engine, current_page - 1); }); paginationContainer.appendChild(prevButton); // Page buttons for (let i = 1; i <= total_pages; i++) { const pageButton = document.createElement('button'); pageButton.textContent = i; pageButton.classList.toggle('active', i === current_page); pageButton.addEventListener('click', () => { if (i !== current_page) loadSearchDomains(engine, i); }); paginationContainer.appendChild(pageButton); } // Next button const nextButton = document.createElement('button'); nextButton.innerHTML = '»'; nextButton.disabled = !has_next; nextButton.addEventListener('click', () => { if (has_next) loadSearchDomains(engine, current_page + 1); }); paginationContainer.appendChild(nextButton); } // Get badge class based on position function getPositionBadgeClass(position) { if (position <= 3) return 'badge-success'; if (position <= 10) return 'badge-warning'; return 'badge-danger'; } // Toggle snippet visibility function toggleSnippet(button) { const snippet = button.nextElementSibling; const isVisible = snippet.style.display === 'block'; snippet.style.display = isVisible ? 'none' : 'block'; button.textContent = isVisible ? 'Vis uddrag' : 'Skjul uddrag'; } </script> <script> // Toggle page details visibility function togglePageDetails(button) { const row = button.closest('tr'); const detailsRow = row.nextElementSibling; const pageDetails = detailsRow.querySelector('.page-details'); // Close all other open page details document.querySelectorAll('.page-details').forEach(detail => { if (detail !== pageDetails) { detail.classList.remove('active'); } }); // Update all button texts document.querySelectorAll('.show-page-btn').forEach(btn => { if (btn !== button) { btn.textContent = 'Vis sidedetaljer'; } }); // Toggle current page details if (pageDetails.classList.contains('active')) { pageDetails.classList.remove('active'); button.textContent = 'Vis sidedetaljer'; } else { pageDetails.classList.add('active'); button.textContent = 'Skjul sidedetaljer'; } } // Close all page details when clicking outside document.addEventListener('click', function(e) { if (!e.target.closest('.show-page-btn') && !e.target.closest('.page-details')) { document.querySelectorAll('.page-details').forEach(detail => { detail.classList.remove('active'); }); document.querySelectorAll('.show-page-btn').forEach(btn => { btn.textContent = 'Vis sidedetaljer'; }); } }); // Update the renderSearchDomains function to include show page buttons function renderSearchDomains(engine, data) { const tbody = document.getElementById(engine + 'PhrasesBody'); tbody.innerHTML = ''; data.forEach((item, index) => { const row = document.createElement('tr'); // Format position with change let positionHtml = `<span class="badge ${getPositionBadgeClass(item.position)}">${item.position}</span>`; if (item.change !== null && item.change !== 0) { const changeClass = item.change > 0 ? 'positive' : 'negative'; const changeSymbol = item.change > 0 ? '+' : ''; positionHtml += `<span class="position-change ${changeClass}">(${changeSymbol}${item.change})</span>`; } row.innerHTML = ` <td>${positionHtml}</td> <td><noindex><a href="/da/domain/${item.domain}/" rel="nofollow">${item.domain}</a></noindex></td> <td>${item.page}</td> <td> <button class="show-page-btn" onclick="togglePageDetails(this)">Vis sidedetaljer</button> </td> `; tbody.appendChild(row); // Add page details row const detailsRow = document.createElement('tr'); detailsRow.className = 'page-details-row'; detailsRow.innerHTML = ` <td colspan="4"> <div class="page-details" id="page-details-${engine}-${index}"> <div class="page-details-grid"> <div class="page-detail-item"> <div class="page-detail-label">Full URL</div> <div class="page-detail-value"> <a href="${item.full_url || '#'}" class="page-url" target="_blank" rel="nofollow"> ${item.full_url || 'N/A'} </a> </div> </div> <div class="page-detail-item"> <div class="page-detail-label">Title</div> <div class="page-detail-value">${item.page_title || 'N/A'}</div> </div> <div class="page-detail-item"> <div class="page-detail-label">Last Updated</div> <div class="page-detail-value">${item.last_updated || 'N/A'}</div> </div> <div class="page-detail-item"> <div class="page-detail-label">Page Authority</div> <div class="page-detail-value">${item.page_authority || 'N/A'}</div> </div> </div> <div class="page-metrics"> <div class="page-metric"> <span class="page-detail-label">Traffic:</span> <span class="page-metric-value">${item.traffic || 'N/A'}</span> </div> <div class="page-metric"> <span class="page-detail-label">Backlinks:</span> <span class="page-metric-value">${item.backlinks || 'N/A'}</span> </div> <div class="page-metric"> <span class="page-detail-label">Social Shares:</span> <span class="page-metric-value">${item.social_shares || 'N/A'}</span> </div> <div class="page-metric"> <span class="page-detail-label">Load Time:</span> <span class="page-metric-value">${item.load_time || 'N/A'}</span> </div> </div> <div class="snippet" style="margin-top: 1rem;"> <strong>Snippet Preview:</strong><br> ${item.snippet || 'No snippet available'} </div> </div> </td> `; tbody.appendChild(detailsRow); }); } </script> </div> <!-- Footer --> <footer> <div class="footer-container"> <div class="footer-content"> <div class="footer-section"> <h3>About serpulse.com</h3> <div class="footer-info"> <p>Professionelt værktøj til søgemaskineanalyse, positionsovervågning og SEO-optimering.</p> <p style="margin-top: 1rem;"><strong>Skynet360 LP.</strong></p> <p><strong>Company No:</strong> SL027564</p> <p><strong>Address:</strong> Suite 1 4 Queen Street, Edinburgh, Scotland, EH2 1JE</p> </div> </div> <div class="footer-section"> <h3>Quick Links</h3> <ul class="footer-links"> <li><a href="/da/">Hjem</a></li> <li><a href="/da/profile/">Profil</a></li> <li><a href="/da/tasks/">Overvågningsopgaver</a></li> <li><a href="/da/api_docs/">API dokumentation</a></li> <li><a href="/da/team/">Vores team</a></li> </ul> </div> <div class="footer-section"> <h3>Resources</h3> <ul class="footer-links"> <!--<li><a href="#">Dokumentation</a></li>--> <li><a href="/da/blogs/">Blog</a></li> <li><a href="/da/faq/">FAQ</a></li> <li><a href="/da/support/">Støtte</a></li> </ul> </div> <div class="footer-section"> <h3>Contacts</h3> <div class="footer-info"> <p>Email: <a href="mailto:info@serpuls.com">info@serpuls.com</a></p> <p>Telegram: <a href="https://t.me/serpulse_support">@serpulse_support</a></p> <div class="social-links"> <a href="#" class="social-link" title="Telegram">📱</a> <a href="https://github.com/SkyNetJose/serpuls" class="social-link" title="GitHub">💻</a> <a href="#" class="social-link" title="Twitter">🐦</a> </div> </div> </div> </div> <div class="footer-bottom"> <p class="copyright">© 2026 serpuls.com. All rights reserved. Skynet360 LP.</p> <div class="footer-bottom-links"> <a href="/da/privacy/">Privatlivspolitik</a> <a href="/da/terms/">Vilkår for brug</a> <a href="/da/agreement/">Brugeraftale</a> <a href="/da/cookie/">Cookies politik</a> </div> </div> </div> </footer> <!-- Updated Payment Modal HTML --> <div class="modal" id="paymentModal"> <div class="modal-content"> <span class="close-btn">×</span> <div class="modal-success" id="paymentSuccess"> <div class="success-icon">✓</div> <h3>Платеж успешен!</h3> <p>Спасибо за ваш заказ. Мы свяжемся с вами в ближайшее время.</p> <button class="cta-button" onclick="closeModal('paymentModal')">Закрывать</button> </div> <form id="paymentForm" onsubmit="return processPayment(event)"> <h2 class="modal-title" id="modalTitle">Оплата за услугу</h2> <p class="modal-text" id="modalText">Описание услуги</p> <!-- Hidden fields for payment type and ID --> <input type="hidden" id="paymentType" name="payment_type" value=""> <input type="hidden" id="paymentItemId" name="payment_item_id" value=""> <!-- Payment Options --> <div class="payment-options" id="paymentOptions"> <!-- Options will be dynamically generated here --> </div> <!-- Manual Price Input (Optional) - Now dynamically shown based on config --> <div class="form-group" id="manualPriceGroup" style="display: none;"> <label for="manualPrice">Введите сумму (USD):</label> <input type="number" id="manualPrice" class="form-control" placeholder="Введите сумму" min="1" max="10000" step="0.01" oninput="updateManualPrice(this.value)"> <div class="error-message" id="manualPriceError"></div> </div> <!-- Custom Price Option Toggle - Now dynamically shown --> <div class="form-group" id="customPriceToggle" style="display: none; margin-bottom: 1rem;"> <label style="display: flex; align-items: center; gap: 0.5rem; cursor: pointer;"> <input type="radio" id="customPriceRadio" name="paymentOption" value="custom" onchange="toggleCustomPriceSelection(this.checked)"> Указать свою сумму </label> </div> <div class="form-group"> <label for="modalName">Имя:</label> <input type="text" id="modalName" class="form-control" placeholder="Введите свое имя" required> <div class="error-message" id="modalNameError"></div> </div> <div class="form-group"> <label for="modalEmail">Электронная почта:</label> <input type="email" id="modalEmail" class="form-control" placeholder="Введите адрес электронной почты" required> <div class="error-message" id="modalEmailError"></div> </div> <p class="modal-price" id="modalPrice">Цена: $0.00</p> <button type="submit" class="cta-button" id="payButton">Платить $0.00</button> </form> </div> </div> <!-- Redirect Modal (for iframe) --> <div class="modal" id="redirectModal"> <div class="modal-content modal-large"> <span class="close-btn">×</span> <h2 class="modal-title">Betaling</h2> <iframe id="redirectIframe" class="modal-iframe" src=""></iframe> </div> </div> <!-- Auth Modal --> <div class="modal" id="authModal"> <div class="modal-content"> <span class="close-btn">×</span> <div class="auth-tabs"> <div class="auth-tab active" data-tab="login">Авторизоваться</div> <div class="auth-tab" data-tab="register">Зарегистрироваться</div> </div> <div class="auth-form active" id="loginForm"> <h2 class="modal-title">Войти в аккаунт</h2> <!-- Regular Login --> <div class="form-group"> <label for="loginEmail">Электронная почта:</label> <input type="email" id="loginEmail" class="form-control" placeholder="Введите адрес электронной почты"> <div class="error-message" id="loginEmailError"></div> </div> <div class="form-group"> <label for="loginPassword">Пароль:</label> <input type="password" id="loginPassword" class="form-control" placeholder="Введите свой пароль"> <div class="error-message" id="loginPasswordError"></div> </div> <button class="cta-button" style="width: 100%;" onclick="processLogin()">Авторизоваться</button> <!-- Telegram Login Option --> <div style="text-align: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e9ecef;"> <p style="margin-bottom: 1rem; color: var(--gray);">Или войдите через Telegram</p> <button class="cta-button" style="background: #0088cc; width: 100%;" onclick="loginWithTelegram()"> <span style="margin-right: 0.5rem;">📱</span> Войти через Telegram </button> </div> </div> <div class="auth-form" id="registerForm"> <h2 class="modal-title">Зарегистрироваться через Telegram</h2> <!-- Registration Form --> <div class="form-group"> <label for="registerName">Имя:</label> <input type="text" id="registerName" class="form-control" placeholder="Введите свое имя" required> <div class="error-message" id="registerNameError"></div> </div> <div class="form-group"> <label for="registerEmail">Электронная почта:</label> <input type="email" id="registerEmail" class="form-control" placeholder="Введите адрес электронной почты" required> <div class="error-message" id="registerEmailError"></div> </div> <button class="cta-button" style="background: #0088cc; width: 100%; padding: 1rem; font-size: 1.1rem;" onclick="startTelegramRegistration()"> <span style="margin-right: 0.5rem;">🚀</span> Продолжить регистрацию в Telegram </button> <div class="how-it-works"> <h4 class="how-it-works-title">Как это работает:</h4> <ol class="how-it-works-list"> <li>Введите имя и email выше</li> <li>Нажмите кнопку для открытия Telegram</li> <li>Завершите регистрацию в боте (потребуется номер телефона)</li> <li>Получите email с данными для входа</li> </ol> </div> </div> </div> </div> <!-- Telegram Code Input Modal --> <div class="modal" id="telegramCodeModal"> <div class="modal-content"> <span class="close-btn" onclick="closeModal('telegramCodeModal')">×</span> <div class="centered-content"> <div class="success-icon">🔐</div> <h2 class="modal-title">Код подтверждения</h2> <p class="modal-text">Код был отправлен в Telegram. Введите его ниже:</p> <div class="form-group"> <input type="text" id="telegramLoginCode" class="form-control verify-code-input" placeholder="0000000" maxlength="7" style="font-size: 1.5rem; letter-spacing: 0.5rem;"> <div class="error-message" id="telegramLoginCodeError"></div> </div> <button class="cta-button" style="width: 100%; margin-top: 1rem;" onclick="verifyTelegramLoginCode()"> Подтвердить вход </button> <div class="timer-container" id="loginCodeTimer"> Код действителен: <span id="loginTimer">05:00</span> </div> </div> </div> </div> <!-- Updated Telegram Verification Modal --> <div class="modal" id="telegramVerifyModal"> <div class="modal-content"> <span class="close-btn" onclick="closeTelegramVerifyModal()">×</span> <div class="centered-content"> <div class="success-icon">📱</div> <h2 class="modal-title">Завершите регистрацию в Telegram</h2> <p class="modal-text" id="telegramModalText"> Telegram был открыт в новой вкладке.<br> Если бот не открылся автоматически, используйте кнопку ниже или отсканируйте QR-код. </p> <!-- QR Code Container --> <div id="qrCodeContainer" style="margin: 1.5rem 0; text-align: center;"> <div id="qrcode" style="display: inline-block;"></div> <p style="font-size: 0.9rem; color: var(--gray); margin-top: 0.5rem;"> Отсканируйте QR-код для открытия бота </p> </div> <!-- Timer and Status --> <div id="telegramTimer" class="timer-container"> Ожидание подтверждения... <span id="timer">05:00</span> </div> <!-- Action Buttons --> <div style="display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center;"> <button class="cta-button" style="background: #0088cc;" onclick="openTelegramBot()" id="openTelegramBtn"> 📱 Открыть Telegram снова </button> <button class="cta-button secondary" onclick="refreshTelegramQR()" id="refreshQRBtn"> 🔄 Обновить QR-код </button> </div> <!-- Status Info --> <div class="info-box" style="margin-top: 1.5rem;"> <p style="margin: 0; font-size: 0.9rem;"> <strong>Как это работает:</strong><br> 1. Нажмите "Открыть Telegram" или отсканируйте QR-код<br> 2. В боте нажмите START и поделитесь номером телефона<br> 3. Статус подтверждения обновится автоматически </p> </div> </div> </div> </div> <!-- Email Verification Modal --> <div class="modal" id="emailVerifyModal"> <div class="modal-content"> <span class="close-btn" onclick="closeEmailVerifyModal()">×</span> <div class="centered-content"> <div class="success-icon">📧</div> <h2 class="modal-title">Подтверждение Email</h2> <p class="modal-text">Мы отправили письмо с подтверждением на ваш email</p> <!-- Email Verification Input --> <div class="form-group"> <label for="emailVerifyToken">Код подтверждения:</label> <input type="text" id="emailVerifyToken" class="form-control" placeholder="Введите код из письма" style="text-align: center; font-size: 1.1rem;"> <div class="error-message" id="emailVerifyTokenError"></div> </div> <button class="cta-button" style="width: 100%; margin-bottom: 1rem;" onclick="verifyEmailToken()"> Подтвердить Email </button> <button id="resendEmailBtn" class="cta-button secondary" style="width: 100%;" onclick="resendEmailVerification()" disabled> Отправить код повторно (<span id="resendTimer">300</span>) </button> <!-- Auto-check status --> <div id="emailCheckStatus" style="margin-top: 1rem; display: none;"> <p style="color: var(--gray); font-size: 0.9rem;"> 🔍 Проверяем статус подтверждения... </p> </div> </div> </div> </div> <!-- Image reusable Modal --> <div class="modal" id="imgModal"> <div class="modal-content"> <span class="close-btn">×</span> <img id="modalImg" src="" style="max-width:90%; max-height:90%; margin-top:40px; border-radius:8px;"> </div> </div> <!--Loading overlay --> <div class="loading-overlay" id="loadingOverlay"> <div class="loading-spinner"></div> </div> <div class="toast" id="toast"></div> <script> // Get language from URL path like /en/about or /ru/products function getLangFromUrl() { const path = window.location.pathname; const match = path.match(/^\/([a-z]{2})(\/|$)/i); return match ? match[1] : 'en'; // default to 'en' if no language code found } // Store in global variable window.currentLang = getLangFromUrl(); // Show loading overlay function showLoading() { document.getElementById('loadingOverlay').classList.add('active'); } // Hide loading overlay function hideLoading() { document.getElementById('loadingOverlay').classList.remove('active'); } // Show toast notification function showToast(message, type = 'info') { const toast = document.getElementById('toast'); toast.textContent = message; toast.className = 'toast ' + type; toast.classList.add('show'); setTimeout(() => { toast.classList.remove('show'); }, 3000); } // Check user login status on page load document.addEventListener('DOMContentLoaded', function() { checkUserLoginStatus(); }); // Function to check if user is logged in function checkUserLoginStatus() { const userInfoElement = document.getElementById('userInfo'); const guestButtonsElement = document.getElementById('guestButtons'); const userNameElement = document.getElementById('userName'); // Show loading state or keep defaults while checking if (guestButtonsElement) { guestButtonsElement.style.display = 'flex'; } if (userInfoElement) { userInfoElement.style.display = 'none'; } const data = { type: 'check_user_logined' }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { if (response.user_logined === 1) { // User is logged in if (userInfoElement) { userInfoElement.style.display = 'block'; } if (guestButtonsElement) { guestButtonsElement.style.display = 'none'; } if (userNameElement) { // Use logined_user_name if available, otherwise show default userNameElement.textContent = response.logined_user_name || 'Профиль'; } // Optionally store minimal info in localStorage for quick access // but don't rely on it for auth state if (response.logined_user_id) { localStorage.setItem('user_id', response.logined_user_id); } if (response.logined_user_name) { localStorage.setItem('user_name', response.logined_user_name); } } else { // User is not logged in if (userInfoElement) { userInfoElement.style.display = 'none'; } if (guestButtonsElement) { guestButtonsElement.style.display = 'flex'; } // Clear any previously stored user data localStorage.removeItem('user_id'); localStorage.removeItem('user_name'); localStorage.removeItem('user_info'); } } else { console.error('Error checking login status:', response.error); // On error, default to guest view if (userInfoElement) { userInfoElement.style.display = 'none'; } if (guestButtonsElement) { guestButtonsElement.style.display = 'flex'; } } }, false); // Don't show loading overlay for this quick check } // Logout function function logout() { // Send logout request to server const data = { type: 'logout' }; sendRequest('/ajax/', data, function(response) { // Clear all user data from localStorage regardless of response localStorage.removeItem('user_info'); localStorage.removeItem('user_id'); localStorage.removeItem('user_name'); localStorage.removeItem('current_user_token'); // Update UI checkUserLoginStatus(); // Redirect to main page window.location.href = '/'; }); } </script> <script> // Mobile menu toggle - Combined approach document.getElementById('hamburger').addEventListener('click', function() { const mobileMenu = document.getElementById('mobileMenu'); mobileMenu.classList.toggle('active'); }); // Close mobile menu when clicking on links or buttons document.querySelectorAll('.nav-links a, .auth-buttons button').forEach(element => { element.addEventListener('click', function() { document.getElementById('mobileMenu').classList.remove('active'); }); }); // Close mobile menu when clicking outside document.addEventListener('click', function(event) { const mobileMenu = document.getElementById('mobileMenu'); const hamburger = document.getElementById('hamburger'); const navContainer = document.querySelector('.nav-container'); if (!navContainer.contains(event.target) && mobileMenu.classList.contains('active')) { mobileMenu.classList.remove('active'); } }); // Simple animation on scroll document.addEventListener('DOMContentLoaded', function() { const cards = document.querySelectorAll('.card, .domain-header, .chart-container'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; } }); }, { threshold: 0.1 }); cards.forEach(card => { card.style.opacity = '0'; card.style.transform = 'translateY(20px)'; card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; observer.observe(card); }); }); // Toggle links visibility function toggleLinks(className, btn, max_count = 5) { const list = document.getElementById(className); const items = list.querySelectorAll('li'); const hiddenItems = list.querySelectorAll('li.hidden'); if (hiddenItems.length > 0) { // Show all list.querySelectorAll('li.hidden').forEach(el => el.classList.remove('hidden')); btn.textContent = 'Skjule'; } else { // Hide all beyond the first 5 items.forEach((el, index) => { if (index >= max_count) el.classList.add('hidden'); }); btn.textContent = 'Vis mere'; } } // Toggle raw data visibility function toggleRawData(elementId, btn) { const element = document.getElementById(elementId); if (element.style.maxHeight === '200px') { element.style.maxHeight = 'none'; btn.textContent = 'Skjul alle data'; } else { element.style.maxHeight = '200px'; btn.textContent = 'Vis fulde data'; } } </script> <script> // Payment Modal // Global variable to store payment config let paymentConfig = { allowCustomAmount: false, minAmount: 1, maxAmount: 1000 }; // Payment options functionality document.addEventListener('DOMContentLoaded', function() { // Replace the entire payment options event listener with this: document.addEventListener('change', function(e) { if (e.target && e.target.name === 'paymentOption') { // Update selected state for regular options document.querySelectorAll('.payment-option').forEach(opt => { opt.classList.remove('selected'); }); // Handle custom price radio separately if (e.target.id === 'customPriceRadio') { // For custom price, we don't have a .payment-option wrapper // Just update the custom price toggle UI document.querySelectorAll('.payment-option').forEach(opt => { opt.classList.remove('selected'); }); // You might want to add visual feedback for custom price selection const customPriceToggle = document.getElementById('customPriceToggle'); if (customPriceToggle) { customPriceToggle.style.backgroundColor = 'rgba(67, 97, 238, 0.1)'; customPriceToggle.style.borderLeft = '3px solid var(--primary)'; customPriceToggle.style.padding = '0.5rem'; customPriceToggle.style.borderRadius = 'var(--border-radius)'; } } else { // For regular options, highlight the .payment-option container const paymentOption = e.target.closest('.payment-option'); if (paymentOption) { paymentOption.classList.add('selected'); // Reset custom price toggle styling if it was highlighted const customPriceToggle = document.getElementById('customPriceToggle'); if (customPriceToggle) { customPriceToggle.style.backgroundColor = ''; customPriceToggle.style.borderLeft = ''; customPriceToggle.style.padding = ''; } } } // Update price (this should work for all options) updatePaymentPrice(e.target.value); } }); }); // Update the updatePaymentPrice function to handle custom price: function updatePaymentPrice(price) { const modalPrice = document.getElementById('modalPrice'); const payButton = document.getElementById('payButton'); const customPriceRadio = document.getElementById('customPriceRadio'); // Uncheck custom price radio if regular option is selected if (customPriceRadio && customPriceRadio.checked === false) { document.getElementById('manualPriceGroup').style.display = 'none'; // Reset custom price toggle styling const customPriceToggle = document.getElementById('customPriceToggle'); if (customPriceToggle) { customPriceToggle.style.backgroundColor = ''; customPriceToggle.style.borderLeft = ''; customPriceToggle.style.padding = ''; } } modalPrice.textContent = 'Цена: $' + parseFloat(price).toFixed(2); payButton.textContent = 'Платить $' + parseFloat(price).toFixed(2); payButton.disabled = false; payButton.style.opacity = '1'; } // Generate payment options based on config function generatePaymentOptions(optionsData, paymentType = 'balance', paymentItemId = '', config = {}) { const paymentOptionsContainer = document.getElementById('paymentOptions'); const paymentTypeInput = document.getElementById('paymentType'); const paymentItemIdInput = document.getElementById('paymentItemId'); const customPriceToggle = document.getElementById('customPriceToggle'); const manualPriceGroup = document.getElementById('manualPriceGroup'); // Set hidden fields paymentTypeInput.value = paymentType; paymentItemIdInput.value = paymentItemId; // Store config globally paymentConfig = { allowCustomAmount: config.allowCustomAmount || false, minAmount: config.minAmount || 1, maxAmount: config.maxAmount || 1000 }; // Clear container paymentOptionsContainer.innerHTML = ''; // Generate regular options if (optionsData && optionsData.length > 0) { optionsData.forEach((option, index) => { const optionElement = document.createElement('div'); optionElement.className = 'payment-option'; optionElement.innerHTML = ` <input type="radio" id="option${index}" name="paymentOption" value="${option.price}" data-label="${option.label}" ${option.default ? 'checked' : ''} onchange="updatePaymentPrice('${option.price}')"> <label for="option${index}">${option.label} - $${option.price}</label> `; paymentOptionsContainer.appendChild(optionElement); }); paymentOptionsContainer.style.display = 'block'; } else { paymentOptionsContainer.style.display = 'none'; } // Show/hide custom amount option based on config if (paymentConfig.allowCustomAmount) { customPriceToggle.style.display = 'block'; // Update manual price input constraints document.getElementById('manualPrice').min = paymentConfig.minAmount; document.getElementById('manualPrice').max = paymentConfig.maxAmount; document.getElementById('manualPrice').placeholder = `От $${paymentConfig.minAmount} до $${paymentConfig.maxAmount}`; } else { customPriceToggle.style.display = 'none'; manualPriceGroup.style.display = 'none'; } // Select first option by default if none is marked as default if (optionsData && optionsData.length > 0) { const defaultOption = paymentOptionsContainer.querySelector('input[type="radio"][checked]') || paymentOptionsContainer.querySelector('input[type="radio"]'); if (defaultOption) { defaultOption.checked = true; defaultOption.closest('.payment-option').classList.add('selected'); updatePaymentPrice(defaultOption.value); } } else if (paymentConfig.allowCustomAmount) { // If no options but custom amount is allowed, show custom by default document.getElementById('customPriceRadio').checked = true; toggleCustomPriceSelection(true); } } // Also update the toggleCustomPriceSelection function: function toggleCustomPriceSelection(isSelected) { const manualPriceGroup = document.getElementById('manualPriceGroup'); const paymentOptions = document.getElementById('paymentOptions'); const customPriceRadio = document.getElementById('customPriceRadio'); if (isSelected) { manualPriceGroup.style.display = 'block'; // Deselect all regular options document.querySelectorAll('input[name="paymentOption"]').forEach(radio => { if (radio.id !== 'customPriceRadio') { radio.checked = false; const paymentOption = radio.closest('.payment-option'); if (paymentOption) { paymentOption.classList.remove('selected'); } } }); // Visual feedback for custom price selection const customPriceToggle = document.getElementById('customPriceToggle'); if (customPriceToggle) { customPriceToggle.style.backgroundColor = 'rgba(67, 97, 238, 0.1)'; customPriceToggle.style.borderLeft = '3px solid var(--primary)'; customPriceToggle.style.padding = '0.5rem'; customPriceToggle.style.borderRadius = 'var(--border-radius)'; customPriceToggle.style.transition = 'var(--transition)'; } // Focus on manual price input setTimeout(() => { const manualInput = document.getElementById('manualPrice'); manualInput.focus(); // Update price if there's already a value if (manualInput.value) { updateManualPrice(manualInput.value); } else { // Set default to min amount updateManualPrice(paymentConfig.minAmount); manualInput.value = paymentConfig.minAmount; } }, 100); } else { manualPriceGroup.style.display = 'none'; // Reset custom price toggle styling const customPriceToggle = document.getElementById('customPriceToggle'); if (customPriceToggle) { customPriceToggle.style.backgroundColor = ''; customPriceToggle.style.borderLeft = ''; customPriceToggle.style.padding = ''; } } } // Update price from manual input in real-time function updateManualPrice(price) { if (!price || price < paymentConfig.minAmount || price > paymentConfig.maxAmount) { const modalPrice = document.getElementById('modalPrice'); const payButton = document.getElementById('payButton'); if (price && (price < paymentConfig.minAmount || price > paymentConfig.maxAmount)) { modalPrice.textContent = `Цена: от $${paymentConfig.minAmount} до $${paymentConfig.maxAmount}`; payButton.textContent = 'Неверная сумма'; payButton.disabled = true; payButton.style.opacity = '0.6'; } else { modalPrice.textContent = 'Цена: $0.00'; payButton.textContent = 'Платить $0.00'; payButton.disabled = true; payButton.style.opacity = '0.6'; } return; } const modalPrice = document.getElementById('modalPrice'); const payButton = document.getElementById('payButton'); modalPrice.textContent = 'Цена: $' + parseFloat(price).toFixed(2); payButton.textContent = 'Платить $' + parseFloat(price).toFixed(2); payButton.disabled = false; payButton.style.opacity = '1'; } const paymentModal = document.getElementById('paymentModal'); const paymentCloseBtn = paymentModal.querySelector('.close-btn'); // Elements inside modal const modalTitle = document.getElementById('modalTitle'); const modalText = document.getElementById('modalText'); const modalPrice = document.getElementById('modalPrice'); const payButton = document.getElementById('payButton'); const paymentForm = document.getElementById('paymentForm'); const paymentSuccess = document.getElementById('paymentSuccess'); // Updated modal opening handler document.querySelectorAll('[data-modal="paymentModal"]').forEach(trigger => { trigger.addEventListener('click', function(e) { e.preventDefault(); // Get data attributes const title = this.getAttribute('data-title'); const text = this.getAttribute('data-text'); const price = this.getAttribute('data-price'); const paymentType = this.getAttribute('data-payment-type') || 'balance'; const paymentItemId = this.getAttribute('data-payment-item-id') || ''; // Get payment config from data attributes const allowCustomAmount = this.getAttribute('data-allow-custom') === 'true'; const minAmount = parseFloat(this.getAttribute('data-min-amount')) || 1; const maxAmount = parseFloat(this.getAttribute('data-max-amount')) || 1000; // Get payment options from data attribute const optionsData = this.getAttribute('data-options'); let paymentOptions = []; if (optionsData) { try { paymentOptions = JSON.parse(optionsData); } catch (e) { console.error('Error parsing payment options:', e); } } // Fill modal content document.getElementById('modalTitle').textContent = title; document.getElementById('modalText').textContent = text; // Generate payment options with config const config = { allowCustomAmount: allowCustomAmount, minAmount: minAmount, maxAmount: maxAmount }; generatePaymentOptions(paymentOptions, paymentType, paymentItemId, config); // If no options and custom amount not allowed, use default price if (paymentOptions.length === 0 && !allowCustomAmount) { updatePaymentPrice(price); } // Reset form resetForm('paymentModal'); document.getElementById('paymentForm').style.display = 'block'; document.getElementById('paymentSuccess').style.display = 'none'; // Show modal document.getElementById('paymentModal').style.display = 'flex'; }); }); // Helper function to reset form function resetPaymentForm() { document.getElementById('modalName').value = ''; document.getElementById('modalEmail').value = ''; document.getElementById('manualPrice').value = ''; if (document.getElementById('customPriceRadio')) { document.getElementById('customPriceRadio').checked = false; } clearErrors(['nameError', 'emailError', 'manualPriceError']); } // Close payment modal paymentCloseBtn.addEventListener('click', function() { paymentModal.style.display = 'none'; }); // Close on outside click window.addEventListener('click', function(e) { if (e.target === paymentModal) { paymentModal.style.display = 'none'; } }); // Fill tooltip with alt text automatically document.querySelectorAll('.popup-trigger').forEach(trigger => { const altText = trigger.getAttribute('alt'); const popupText = trigger.querySelector('.popup-text'); if (popupText && altText) { popupText.textContent = altText; } }); </script> <script> // Fill tooltip with alt text automatically document.querySelectorAll('.popup-trigger').forEach(trigger => { const altText = trigger.getAttribute('alt'); const popupText = trigger.querySelector('.popup-text'); if (popupText && altText) { popupText.textContent = altText; } }); // Auth Modal const authModal = document.getElementById('authModal'); const authCloseBtn = authModal.querySelector('.close-btn'); const loginBtn = document.getElementById('loginBtn'); const registerBtn = document.getElementById('registerBtn'); const authTabs = document.querySelectorAll('.auth-tab'); const authForms = document.querySelectorAll('.auth-form'); // Open auth modal loginBtn.addEventListener('click', function() { authModal.style.display = 'flex'; switchAuthTab('login'); resetForm('authModal'); }); registerBtn.addEventListener('click', function() { authModal.style.display = 'flex'; switchAuthTab('register'); resetForm('authModal'); }); // Close auth modal authCloseBtn.addEventListener('click', function() { authModal.style.display = 'none'; }); // Close on outside click window.addEventListener('click', function(e) { if (e.target === authModal) { authModal.style.display = 'none'; } }); // Switch auth tabs function switchAuthTab(tabName) { authTabs.forEach(tab => { if (tab.getAttribute('data-tab') === tabName) { tab.classList.add('active'); } else { tab.classList.remove('active'); } }); authForms.forEach(form => { if (form.id === tabName + 'Form') { form.classList.add('active'); } else { form.classList.remove('active'); } }); } // Add click events to auth tabs authTabs.forEach(tab => { tab.addEventListener('click', function() { const tabName = this.getAttribute('data-tab'); switchAuthTab(tabName); resetForm('authModal'); }); }); // Reset form and errors function resetForm(modalType) { if (modalType === 'paymentModal') { document.getElementById('modalName').value = ''; document.getElementById('modalEmail').value = ''; clearErrors(['nameError', 'emailError']); } else if (modalType === 'authModal') { document.getElementById('loginEmail').value = ''; document.getElementById('loginPassword').value = ''; document.getElementById('registerName').value = ''; document.getElementById('registerEmail').value = ''; if(document.getElementById('registerPassword'))document.getElementById('registerPassword').value = ''; if(document.getElementById('registerConfirmPassword'))document.getElementById('registerConfirmPassword').value = ''; clearErrors(['loginEmailError', 'loginPasswordError', 'registerNameError', 'registerEmailError', 'registerPasswordError', 'registerConfirmPasswordError']); } } // Clear error messages function clearErrors(errorIds) { errorIds.forEach(id => { const errorElement = document.getElementById(id); if (errorElement) { errorElement.textContent = ''; errorElement.classList.remove('show'); const inputElement = document.getElementById(id.replace('Error', '')); if (inputElement) { inputElement.classList.remove('error'); } } }); } // Show error message function showError(fieldId, message) { const errorElement = document.getElementById(fieldId + 'Error'); const inputElement = document.getElementById(fieldId); if (errorElement) { errorElement.textContent = message; errorElement.classList.add('show'); } if (inputElement) { inputElement.classList.add('error'); } } // Enhanced close modal function for general use function closeModal(modalId) { // Clear timers based on which modal is being closed switch(modalId) { case 'telegramVerifyModal': clearTelegramTimers(); break; case 'emailVerifyModal': clearEmailTimers(); break; case 'authModal': // Clear any potential timers in auth modal break; } document.getElementById(modalId).style.display = 'none'; } // Enhanced processPayment function function processPayment(event) { if (event) event.preventDefault(); const name = document.getElementById('modalName').value; const email = document.getElementById('modalEmail').value; const paymentType = document.getElementById('paymentType').value; const paymentItemId = document.getElementById('paymentItemId').value; // Get price - check if using custom amount or selected option let price; let optionLabel = ''; const customPriceRadio = document.getElementById('customPriceRadio'); if (customPriceRadio && customPriceRadio.checked) { // Custom amount price = document.getElementById('manualPrice').value; optionLabel = 'custom_amount'; // Validate custom amount if (!price || price < paymentConfig.minAmount || price > paymentConfig.maxAmount) { showError('manualPrice', `Сумма должна быть от $${paymentConfig.minAmount} до $${paymentConfig.maxAmount}`); return false; } } else { // Regular option const selectedOption = document.querySelector('input[name="paymentOption"]:checked'); if (selectedOption) { price = selectedOption.value; optionLabel = selectedOption.getAttribute('data-label') || 'selected_option'; } else { // Fallback to default price price = document.getElementById('modalPrice').textContent.match(/\d+\.\d+/)?.[0] || '0'; optionLabel = 'default'; } } const service = document.getElementById('modalTitle').textContent; // Clear previous errors clearErrors(['nameError', 'emailError', 'manualPriceError']); // Validate form let hasErrors = false; if (!name) { showError('modalName', 'Пожалуйста, введите свое имя'); hasErrors = true; } if (!email) { showError('modalEmail', 'Пожалуйста, введите свой адрес электронной почты'); hasErrors = true; } else if (!/\S+@\S+\.\S+/.test(email)) { showError('modalEmail', 'Пожалуйста, введите действительный адрес электронной почты'); hasErrors = true; } if (hasErrors) return false; // Prepare data for API request const data = { type: 'payment', name: name, email: email, price: parseFloat(price).toFixed(2), service: service, payment_type: paymentType, payment_item_id: paymentItemId, option: optionLabel, is_custom_amount: (customPriceRadio && customPriceRadio.checked) ? 1 : 0 }; // Send request to API sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { if (response.redirect_url) { handlePaymentRedirect(response.redirect_url, response.redirect_type); } else { // Show success message document.getElementById('paymentForm').style.display = 'none'; document.getElementById('paymentSuccess').style.display = 'block'; } } else { // Show error message alert('Ошибка: ' + response.error); } }); return false; } // Handle payment redirect function handlePaymentRedirect(redirectUrl, redirectType) { switch (redirectType) { case 'new_window': window.open(redirectUrl, '_blank'); closeModal('paymentModal'); break; case 'iframe': document.getElementById('redirectIframe').src = redirectUrl; closeModal('paymentModal'); document.getElementById('redirectModal').style.display = 'flex'; break; case 'default': default: window.location.href = redirectUrl; break; } } // Process login function processLogin() { const email = document.getElementById('loginEmail').value; const password = document.getElementById('loginPassword').value; // Clear previous errors clearErrors(['loginEmail', 'loginPassword']); // Validate form let hasErrors = false; if (!email) { showError('loginEmail', 'Indtast venligst din e-mail'); hasErrors = true; } else if (!/\S+@\S+\.\S+/.test(email)) { showError('loginEmail', 'Indtast venligst en gyldig e-mail'); hasErrors = true; } if (!password) { showError('loginPassword', 'Indtast venligst din adgangskode'); hasErrors = true; } if (hasErrors) return; // Prepare data for API request const data = { type: 'login', email: email, password: password }; // Send request to API sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Close modal and redirect or show success closeModal('authModal'); alert('Login lykkedes!'); // Redirect to profile window.location.href = '/' + window.currentLang + '/profile/'; } else { // Show error message alert('Fejl: ' + response.error); } }); } // Process registration function processRegistration() { const name = document.getElementById('registerName').value; const email = document.getElementById('registerEmail').value; const password = document.getElementById('registerPassword').value; const confirmPassword = document.getElementById('registerConfirmPassword').value; // Clear previous errors clearErrors(['registerName', 'registerEmail', 'registerPassword', 'registerConfirmPassword']); // Validate form let hasErrors = false; if (!name) { showError('registerName', 'Indtast venligst dit navn'); hasErrors = true; } if (!email) { showError('registerEmail', 'Indtast venligst din e-mail'); hasErrors = true; } else if (!/\S+@\S+\.\S+/.test(email)) { showError('registerEmail', 'Indtast venligst en gyldig e-mail'); hasErrors = true; } if (!password) { showError('registerPassword', 'Opret venligst en adgangskode'); hasErrors = true; } else if (password.length < 6) { showError('registerPassword', 'Adgangskoden skal være på mindst 6 tegn'); hasErrors = true; } if (!confirmPassword) { showError('registerConfirmPassword', 'Bekræft venligst din adgangskode'); hasErrors = true; } else if (password !== confirmPassword) { showError('registerConfirmPassword', 'Adgangskoder stemmer ikke overens'); hasErrors = true; } if (hasErrors) return; // Prepare data for API request const data = { type: 'registration', name: name, email: email, password: password }; // Send request to API sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Close modal and redirect or show success closeModal('authModal'); alert('Registreringen lykkedes!'); // Here you would typically redirect or update UI } else { // Show error message alert('Fejl: ' + response.error); } }); } // Send AJAX request function sendRequest(url, data, callback,need_loading_overlay=true) { // Show loading overlay when request starts if(need_loading_overlay)showLoading(); //console.log("XMLHttpRequest started"); const xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.onreadystatechange = function() { //console.log("XMLHttpRequest onready fired, readyState:", xhr.readyState); if (xhr.readyState === 4) { // Hide loading overlay when request completes if(need_loading_overlay)hideLoading(); //console.log("Request complete, status:", xhr.status); //console.log("responseText:", xhr.responseText); if (xhr.status === 200) { let is_good = true; let response; // Declare response variable outside try block try { response = JSON.parse(xhr.responseText); } catch (e) { is_good=false; console.error("JSON parse error:", e); callback({status: 'error', error: 'Invalid response from server'}); } if(is_good) callback(response); } else { callback({status: 'error', error: 'Server error: ' + xhr.status}); } } }; xhr.send(JSON.stringify(data)); } // Close redirect modal document.getElementById('redirectModal').querySelector('.close-btn').addEventListener('click', function() { document.getElementById('redirectModal').style.display = 'none'; }); // Mock chart data (in a real implementation, you would use Google Charts) function initCharts() { // This is a placeholder for actual chart implementation //console.log('Charts would be initialized here with Google Charts API'); } // Image modal functionality document.addEventListener('DOMContentLoaded', function() { // Image modal const imgModal = document.getElementById('imgModal'); const modalImg = document.getElementById('modalImg'); const imgCloseBtn = imgModal.querySelector('.close-btn'); // Open image modal document.querySelectorAll('[data-modal="imgModal"]').forEach(img => { img.addEventListener('click', function() { modalImg.src = this.src; imgModal.style.display = 'flex'; }); }); // Close image modal imgCloseBtn.addEventListener('click', function() { imgModal.style.display = 'none'; }); // Close on outside click window.addEventListener('click', function(e) { if (e.target === imgModal) { imgModal.style.display = 'none'; } }); }); </script> <script> //console.log("herei"); // Analysis functionality document.addEventListener('DOMContentLoaded', function() { //console.log("DOMContentLoaded"); const analyzeBtn = document.getElementById('analyzeNowBtn'); const analysisStatus = document.getElementById('analysisStatus'); if (analyzeBtn) { analyzeBtn.addEventListener('click', function() { //console.log("click"); // Show captcha modal showCaptchaModal(); }); } }); function showCaptchaModal() { //console.log("showCaptchaModal"); // Create modal for captcha const modal = document.createElement('div'); modal.className = 'modal'; modal.id = 'captchaModal'; modal.style.display = 'flex'; modal.innerHTML = ` <div class="modal-content"> <span class="close-btn" onclick="closeCaptchaModal()">×</span> <h2 class="modal-title">Bekræft, at du ikke er en robot</h2> <p class="modal-text">Indtast teksten fra billedet::</p> <div class="captcha-container"> <img src="/captcha.php" alt="CAPTCHA" class="captcha-image" id="captchaImage"> <button type="button" class="refresh-captcha" onclick="refreshCaptcha()">Opdater kode</button> <input type="text" class="captcha-input" id="captchaInput" placeholder="Indtast kode" maxlength="6"> </div> <button class="cta-button" onclick="submitAnalysis()" style="margin-top: 1rem;">Send til analyse</button> </div> `; document.body.appendChild(modal); } function closeCaptchaModal() { const modal = document.getElementById('captchaModal'); if (modal) { modal.remove(); } } function refreshCaptcha() { const captchaImage = document.getElementById('captchaImage'); if (captchaImage) { // Add timestamp to prevent caching captchaImage.src = '/captcha.php?t=' + new Date().getTime(); } } function submitAnalysis() { const captchaInput = document.getElementById('captchaInput'); const captchaCode = captchaInput ? captchaInput.value.trim() : ''; const analysisStatus = document.getElementById('analysisStatus'); if (!captchaCode) { alert('Indtast venligst koden fra billedet'); return; } // Show loading state analysisStatus.textContent = 'Sender anmodning...'; analysisStatus.className = 'analysis-status'; analysisStatus.style.display = 'block'; // Prepare data for API request const domainName = document.getElementById('domain_name').value; const data = { type: 'domain_analysis', domain: domainName, captcha_code: captchaCode }; // Send request to API sendRequest('/ajax/', data, function(response) { // Close captcha modal closeCaptchaModal(); if (response.status === 'ok') { // Show success message analysisStatus.textContent = 'Din anmodning er blevet sendt, vent venligst på domænebekræftelse'; analysisStatus.className = 'analysis-status success'; } else { // Show error message analysisStatus.textContent = 'Fejl: ' + response.error; analysisStatus.className = 'analysis-status error'; // Refresh captcha on error if (response.refresh_captcha) { setTimeout(refreshCaptcha, 500); } } analysisStatus.style.display = 'block'; // Clear captcha input if (captchaInput) { captchaInput.value = ''; } }); } </script> <script> // Full screenshot functionality function openFullScreenshot(src) { const modal = document.getElementById('fullScreenshotModal'); const img = document.getElementById('fullScreenshotImg'); img.src = src; modal.style.display = 'flex'; // Prevent body scroll when modal is open document.body.style.overflow = 'hidden'; } function closeFullScreenshot() { const modal = document.getElementById('fullScreenshotModal'); modal.style.display = 'none'; // Restore body scroll document.body.style.overflow = 'auto'; } function downloadScreenshot() { const img = document.getElementById('fullScreenshotImg'); const link = document.createElement('a'); link.download = `screenshot-${document.getElementById('domain_name').value}-${new Date().getTime()}.jpg`; link.href = img.src; link.click(); } // Close modal on outside click document.addEventListener('click', function(e) { const modal = document.getElementById('fullScreenshotModal'); if (e.target === modal) { closeFullScreenshot(); } }); // Close modal on Escape key document.addEventListener('keydown', function(e) { if (e.key === 'Escape') { closeFullScreenshot(); } }); </script> <script> // Global variables to track intervals let telegramStatusInterval = null; let telegramTimerInterval = null; let resendTimerInterval = null; let emailCheckInterval = null; // Global variable to store QR code instance let qrcodeInstance = null; function startTelegramRegistration(name=false,email=false) { if(!name)name = document.getElementById('registerName').value.trim(); if(!email)email = document.getElementById('registerEmail').value.trim(); // Clear previous errors clearErrors(['registerName', 'registerEmail']); // Validate form let hasErrors = false; if (!name) { showError('registerName', 'Пожалуйста, введите ваше имя'); hasErrors = true; } if (!email) { showError('registerEmail', 'Пожалуйста, введите ваш email'); hasErrors = true; } else if (!/\S+@\S+\.\S+/.test(email)) { showError('registerEmail', 'Пожалуйста, введите действительный email адрес'); hasErrors = true; } if (hasErrors) return; // Prepare data for API request const data = { type: 'telegram_registration_start', name: name, email: email }; //console.log("telegram_registration_start request"); // Send request to API sendRequest('/ajax/', data, function(response) { //console.log("telegram_registration_start callback"); if (response.status === 'ok') { // Store user token localStorage.setItem('current_user_token', response.user_token); // Immediately open Telegram bot in new tab if (response.deep_link) { window.open(response.deep_link, '_blank'); } // Show Telegram verification modal with deep link and QR code showTelegramVerifyModal(response.bot_username, response.telegram_token, response.deep_link,response.telegram_token_expires_remaining); // Clear form clearRegistrationForm(); // Close auth modal closeModal('authModal'); } else if (response.status === 'continue_email_verification') { //!! // User exists, Telegram verified, but email not verified localStorage.setItem('current_user_token', response.user_token); // Auto-resend email and show verification modal autoResendEmailAndShowModal(response.user_token); // Clear form clearRegistrationForm(); // Close auth modal closeModal('authModal'); } else { alert('Ошибка1: ' + response.error); } }); } // Auto-resend email and show verification modal function autoResendEmailAndShowModal(userToken) { // First, try to resend the email const data = { type: 'resend_email_verification', user_token: userToken }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Email sent successfully, show verification modal with full timer //showEmailVerifyModal(); safeShowEmailVerifyModal(); } else { // Handle resend error - use cooldown_remaining from response if (response.cooldown_remaining !== undefined) { // Use the exact remaining seconds from the response const remainingSeconds = Math.max(1, Math.floor(response.cooldown_remaining)); // Show verification modal with synchronized timer showEmailVerifyModalWithCooldown(remainingSeconds); } else { // Other error - show modal with default timer //showEmailVerifyModal(); safeShowEmailVerifyModal(); alert('Ошибка: ' + response.error); } } }); } // Enhanced resend email verification function function resendEmailVerification() { const userToken = localStorage.getItem('current_user_token'); const resendBtn = document.getElementById('resendEmailBtn'); if (!resendBtn) { alert('Ошибка: кнопка не найдена. Пожалуйста, обновите страницу.'); return; } // Prevent multiple clicks if (resendBtn.disabled) { return; } // Immediately disable button and show loading state resendBtn.disabled = true; resendBtn.style.opacity = '0.7'; resendBtn.innerHTML = 'Отправка...'; const data = { type: 'resend_email_verification', user_token: userToken }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Success - restart timer AND restart email check interval setupResendButtonForTimer(); startResendTimer(300); // CRITICAL FIX: Restart the email check interval restartEmailCheckInterval(); // Update status message const statusElement = document.getElementById('emailCheckStatus'); if (statusElement) { statusElement.innerHTML = '<p style="color: var(--primary);">🔍 Новый код отправлен. Проверяем подтверждение...</p>'; statusElement.className = 'email-check-status status-checking'; statusElement.style.display = 'block'; } alert('Новый код подтверждения отправлен на ваш email'); } else { // Handle different error cases if (response.cooldown_remaining !== undefined) { const remainingSeconds = Math.max(1, Math.floor(response.cooldown_remaining)); setupResendButtonForTimer(); startResendTimer(remainingSeconds); // CRITICAL FIX: Even on cooldown, restart the email check interval restartEmailCheckInterval(); const remainingMinutes = Math.ceil(remainingSeconds / 60); // Update status message const statusElement = document.getElementById('emailCheckStatus'); if (statusElement) { statusElement.innerHTML = `<p style="color: #856404;">⏰ Новый код можно будет отправить через ${remainingMinutes} минут. Проверяем подтверждение предыдущего кода...</p>`; statusElement.style.display = 'block'; } alert('Новый код можно отправить через ' + remainingMinutes + ' минут'); } else { alert('Ошибка: ' + response.error); // Re-enable button on other errors resendBtn.disabled = false; resendBtn.style.opacity = '1'; resendBtn.innerHTML = 'Отправить код повторно'; } } }); } function restartEmailCheckInterval() { const userToken = localStorage.getItem('current_user_token'); let attempts = 0; const maxAttempts = 30; // Clear existing interval if any if (emailCheckInterval) { clearInterval(emailCheckInterval); emailCheckInterval = null; } // Update status to show checking updateEmailCheckStatus('checking', 'Проверяем статус подтверждения...'); // Start new interval emailCheckInterval = setInterval(function() { if (attempts >= maxAttempts) { if (emailCheckInterval) { clearInterval(emailCheckInterval); emailCheckInterval = null; } updateEmailCheckStatus('timeout', 'Время проверки истекло. Пожалуйста, обновите страницу.'); return; } checkEmailVerificationStatus(userToken); attempts++; }, 10000); } // Setup resend button for timer display function setupResendButtonForTimer() { const resendBtn = document.getElementById('resendEmailBtn'); if (!resendBtn) return; resendBtn.disabled = true; resendBtn.style.opacity = '0.7'; // Ensure timer element exists let timerElement = document.getElementById('resendTimer'); if (!timerElement) { timerElement = document.createElement('span'); timerElement.id = 'resendTimer'; resendBtn.appendChild(timerElement); } // Set initial timer display resendBtn.innerHTML = 'Отправить код повторно (<span id="resendTimer">5:00</span>)'; } function showEmailVerifyModalWithCooldown(remainingSeconds) { // Clear previous input const emailVerifyToken = document.getElementById('emailVerifyToken'); if (emailVerifyToken) { emailVerifyToken.value = ''; } clearErrors(['emailVerifyToken']); // Setup button for timer setupResendButtonForTimer(); // Start timer with remaining time startResendTimer(remainingSeconds); // Start email check interval startEmailCheckInterval(); // Show modal document.getElementById('emailVerifyModal').style.display = 'flex'; // Show info message const statusElement = document.getElementById('emailCheckStatus'); if (statusElement) { const remainingMinutes = Math.ceil(remainingSeconds / 60); statusElement.innerHTML = `<p style="color: #856404;">⏰ Новый код можно будет отправить через ${remainingMinutes} минут</p>`; statusElement.className = 'email-check-status status-checking'; statusElement.style.display = 'block'; } } // Safe function to show email verification modal function safeShowEmailVerifyModal() { // Clear previous input const emailVerifyToken = document.getElementById('emailVerifyToken'); if (emailVerifyToken) { emailVerifyToken.value = ''; } clearErrors(['emailVerifyToken']); // Setup button for timer setupResendButtonForTimer(); // Start fresh timer startResendTimer(300); // Start email check interval startEmailCheckInterval(); // Show modal document.getElementById('emailVerifyModal').style.display = 'flex'; } // Safe function to clear registration form function clearRegistrationForm() { const nameField = document.getElementById('registerName'); const emailField = document.getElementById('registerEmail'); if (nameField) nameField.value = ''; if (emailField) emailField.value = ''; // Only clear password fields if they exist (for traditional registration) const passwordField = document.getElementById('registerPassword'); const confirmPasswordField = document.getElementById('registerConfirmPassword'); if (passwordField) passwordField.value = ''; if (confirmPasswordField) confirmPasswordField.value = ''; // Clear any status messages const statusElement = document.getElementById('registrationStatus'); if (statusElement) { statusElement.innerHTML = ''; statusElement.style.display = 'none'; } } // Enhanced showTelegramVerifyModal function function showTelegramVerifyModal(botUsername, telegramToken, deepLink,telegram_token_expires_remaining) { // Set Telegram bot deep link const telegramUrl = deepLink || `https://t.me/${botUsername}?start=${telegramToken}`; window.telegramBotUrl = telegramUrl; // Generate QR code generateQRCode(telegramUrl); // Update the "Open Telegram" button const openTelegramBtn = document.getElementById('openTelegramBtn'); if (openTelegramBtn) { openTelegramBtn.onclick = function() { window.open(telegramUrl, '_blank'); }; } // Update modal text const modalText = document.getElementById('telegramModalText'); if (modalText) { modalText.innerHTML = ` Telegram был открыт в новой вкладке.<br> Если бот не открылся автоматически, используйте кнопку ниже или отсканируйте QR-код. `; } // Start timer //console.log("start timer:"+telegram_token_expires_remaining); startTelegramTimer(telegram_token_expires_remaining); // Start status checking startTelegramStatusCheck(); // Show modal document.getElementById('telegramVerifyModal').style.display = 'flex'; } // Generate QR code using qrcodejs library function generateQRCode(url) { const qrcodeElement = document.getElementById('qrcode'); // Clear previous QR code if exists if (qrcodeInstance) { qrcodeInstance.clear(); qrcodeElement.innerHTML = ''; } try { // Create new QR code instance qrcodeInstance = new QRCode(qrcodeElement, { text: url, width: 200, height: 200, colorDark: "#000000", colorLight: "#ffffff", correctLevel: QRCode.CorrectLevel.H }); //console.log('QR code generated successfully'); } catch (error) { console.error('QR code generation failed:', error); // Fallback: show message to use the button instead qrcodeElement.innerHTML = ` <div style="color: var(--warning); font-size: 0.9rem; padding: 1rem;"> <p>QR-код недоступен. Используйте кнопку "Открыть Telegram"</p> </div> `; } } // Refresh QR code function refreshTelegramQR() { if (window.telegramBotUrl) { const refreshBtn = document.getElementById('refreshQRBtn'); const originalText = refreshBtn.innerHTML; refreshBtn.innerHTML = '🔄 Обновление...'; refreshBtn.disabled = true; // Regenerate QR code generateQRCode(window.telegramBotUrl); setTimeout(() => { refreshBtn.innerHTML = originalText; refreshBtn.disabled = false; }, 500); } } // Open Telegram bot in new tab function openTelegramBot() { if (window.telegramBotUrl) { window.open(window.telegramBotUrl, '_blank'); } } function startTelegramStatusCheck() { const userToken = localStorage.getItem('current_user_token'); // Clear existing interval if any if (telegramStatusInterval) { clearInterval(telegramStatusInterval); } // Check status every 5 seconds telegramStatusInterval = setInterval(function() { checkTelegramVerificationStatus(userToken); }, 5000); } // Update the checkTelegramVerificationStatus to clear timers on success function checkTelegramVerificationStatus(userToken) { const data = { type: 'check_telegram_verification', user_token: userToken }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { if (response.telegram_verified) { // Telegram verified successfully clearTelegramTimers(); // Show success message const timerContainer = document.getElementById('telegramTimer'); timerContainer.innerHTML = '✅ Telegram успешно подтвержден!'; timerContainer.className = 'timer-container'; timerContainer.style.background = '#d4edda'; timerContainer.style.color = '#155724'; // Auto-proceed to email verification after 2 seconds setTimeout(function() { closeTelegramVerifyModal(); safeShowEmailVerifyModal(); }, 2000); } } },false); } // Enhanced timer functions that store interval IDs function startTelegramTimer(duration) { let timerContainer = document.getElementById('telegramTimer'); let timerElement = document.getElementById('timer'); // Check if timer was expired and reset if needed if (timerContainer && timerContainer.classList.contains('timer-expired')) { //console.log('Timer has expired - resetting UI'); timerContainer.classList.remove('timer-expired'); timerContainer.innerHTML = 'Ожидание подтверждения... <span id="timer">05:00</span>'; // Update timerElement reference after resetting HTML timerElement = document.getElementById('timer'); } let timer = duration; // Clear existing timer if any if (telegramTimerInterval) { clearInterval(telegramTimerInterval); } telegramTimerInterval = setInterval(function() { const minutes = parseInt(timer / 60, 10); const seconds = parseInt(timer % 60, 10); if (timerElement) { timerElement.textContent = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds); } if (--timer < 0) { clearTelegramTimers(); if (timerElement) { timerElement.textContent = "00:00"; } if (timerContainer) { timerContainer.classList.add('timer-expired'); timerContainer.innerHTML = 'Время истекло. Пожалуйста, начните заново.'; } // Auto-close after 3 seconds setTimeout(function() { closeTelegramVerifyModal(); }, 3000); } }, 1000); } // Enhanced close function to clean up QR code function closeTelegramVerifyModal() { // Clear QR code instance if (qrcodeInstance) { qrcodeInstance.clear(); qrcodeInstance = null; } // Clear container const qrcodeElement = document.getElementById('qrcode'); if (qrcodeElement) { qrcodeElement.innerHTML = ''; } // Clear timers clearTelegramTimers(); // Hide modal document.getElementById('telegramVerifyModal').style.display = 'none'; } // Verify Telegram code function verifyTelegramCode() { const code = document.getElementById('telegramVerifyCode').value.trim(); const userToken = localStorage.getItem('current_user_token'); // Clear previous errors clearErrors(['telegramVerifyCode']); if (!code) { showError('telegramVerifyCode', 'Пожалуйста, введите код подтверждения'); return; } if (code.length !== 7) { showError('telegramVerifyCode', 'Код должен содержать 7 цифр'); return; } // Prepare data for API request const data = { type: 'verify_telegram_code', user_token: userToken, verify_code: code }; // Send request to API sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Stop timer clearInterval(telegramTimer); // Close Telegram modal closeTelegramVerifyModal(); // Show email verification modal //showEmailVerifyModal(); safeShowEmailVerifyModal(); } else { showError('telegramVerifyCode', response.error); } }); } // Update the modal opening calls function showEmailVerifyModal() { safeShowEmailVerifyModal(); } // Enhanced start resend timer function function startResendTimer(duration) { let timer = duration; // Clear existing timer if any if (resendTimerInterval) { clearInterval(resendTimerInterval); } // Update timer display immediately updateResendTimerDisplay(timer); resendTimerInterval = setInterval(function() { timer--; updateResendTimerDisplay(timer); if (timer <= 0) { if (resendTimerInterval) { clearInterval(resendTimerInterval); resendTimerInterval = null; } enableResendButton(); } }, 1000); } // Safe function to update timer display function updateResendTimerDisplay(timer) { const timerElement = document.getElementById('resendTimer'); const resendBtn = document.getElementById('resendEmailBtn'); if (!timerElement || !resendBtn) { console.warn('Timer elements not found during update'); return; } const minutes = Math.floor(timer / 60); const seconds = timer % 60; const timeString = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds); timerElement.textContent = timeString; // Update button text while preserving the timer element resendBtn.innerHTML = 'Отправить код повторно (<span id="resendTimer">' + timeString + '</span>)'; } // Helper function to update timer display function updateTimerDisplay(timerElement, timer) { if (!timerElement) return; const minutes = Math.floor(timer / 60); const seconds = timer % 60; timerElement.textContent = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds); } // Enable resend button when timer expires function enableResendButton() { const resendBtn = document.getElementById('resendEmailBtn'); if (!resendBtn) { console.error('Resend button not found'); return; } resendBtn.disabled = false; resendBtn.style.opacity = '1'; // Set final state without timer resendBtn.innerHTML = 'Отправить код повторно'; // Re-create the timer element for future use const timerSpan = document.createElement('span'); timerSpan.id = 'resendTimer'; timerSpan.style.display = 'none'; // Hide when not active resendBtn.appendChild(timerSpan); } // Enhanced email check interval function startEmailCheckInterval() { restartEmailCheckInterval(); // Just call the new function } // Update the checkEmailVerificationStatus to clear interval on success function checkEmailVerificationStatus(userToken) { const data = { type: 'check_email_verification', user_token: userToken }; sendRequest('/ajax/', data, function(response) { const statusElement = document.getElementById('emailCheckStatus'); if (response.status === 'ok') { if (response.email_verified) { // Email verified successfully if (emailCheckInterval) { clearInterval(emailCheckInterval); emailCheckInterval = null; } if (statusElement) { statusElement.innerHTML = '<p style="color: #155724;">✅ Email успешно подтвержден!</p>'; statusElement.className = 'email-check-status status-success'; } // Auto-redirect after 2 seconds setTimeout(function() { completeRegistration(); }, 2000); } else { if (statusElement) { statusElement.style.display = 'block'; statusElement.innerHTML = '<p style="color: var(--primary);">🔍 Проверяем статус подтверждения...</p>'; statusElement.className = 'email-check-status status-checking'; } } } else { // Handle error response if (statusElement) { statusElement.innerHTML = `<p style="color: #721c24;">❌ Ошибка проверки: ${response.error}</p>`; statusElement.className = 'email-check-status status-error'; } } },false); } // Verify email token manually function verifyEmailToken() { const token = document.getElementById('emailVerifyToken').value.trim(); const userToken = localStorage.getItem('current_user_token'); // Clear previous errors clearErrors(['emailVerifyToken']); if (!token) { showError('emailVerifyToken', 'Пожалуйста, введите код подтверждения'); return; } const data = { type: 'verify_email_token', user_token: userToken, email_token: token }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { completeRegistration(); } else { showError('emailVerifyToken', response.error); } }); } // Complete registration and login function completeRegistration() { const userToken = localStorage.getItem('current_user_token'); const data = { type: 'complete_registration', user_token: userToken }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Store user info localStorage.setItem('user_info', JSON.stringify(response.user)); // Close modal closeEmailVerifyModal(); // Redirect to profile window.location.href = '/' + window.currentLang + '/profile/'; } else { alert('Ошибка: ' + response.error); } }); } function closeEmailVerifyModal() { // Clear all email-related intervals if (resendTimerInterval) { clearInterval(resendTimerInterval); resendTimerInterval = null; } if (emailCheckInterval) { clearInterval(emailCheckInterval); emailCheckInterval = null; } document.getElementById('emailVerifyModal').style.display = 'none'; } // Add this to check registration status when email is entered document.getElementById('registerEmail').addEventListener('blur', function() { const email = this.value.trim(); if(statusElement = document.getElementById('registrationStatus')){ statusElement.innerHTML = ''; } if (email && /\S+@\S+\.\S+/.test(email)) { checkRegistrationStatus(email); } }); function checkRegistrationStatus(email) { const data = { type: 'check_registration_status', email: email }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { const status = response.registration_status; let statusElement = document.getElementById('registrationStatus'); // Remove 'const' declaration if (!statusElement) { // Create status element if it doesn't exist statusElement = document.createElement('div'); // Now we're assigning to the existing variable statusElement.id = 'registrationStatus'; statusElement.style.marginTop = '1rem'; statusElement.style.padding = '0.75rem'; statusElement.style.borderRadius = 'var(--border-radius)'; statusElement.style.fontSize = '0.9rem'; const registerForm = document.getElementById('registerForm'); const submitButton = registerForm.querySelector('button[onclick="startTelegramRegistration()"]'); registerForm.insertBefore(statusElement, submitButton.nextSibling); } // Remove the duplicate declaration of statusElement here // const statusElement = document.getElementById('registrationStatus'); // ← This line is removed switch(status) { case 'completed': statusElement.innerHTML = '✅ Этот email уже зарегистрирован. <a href="#" onclick="switchAuthTab(\'login\')">Войдите в систему</a>'; statusElement.style.background = '#d4edda'; statusElement.style.color = '#155724'; break; case 'email_pending': statusElement.innerHTML = '📧 Регистрация почти завершена! Требуется подтверждение email.'; statusElement.style.background = '#fff3cd'; statusElement.style.color = '#856404'; break; case 'telegram_pending': statusElement.innerHTML = '📱 Продолжите регистрацию в Telegram.'; statusElement.style.background = '#cce5ff'; statusElement.style.color = '#004085'; break; case 'incomplete': statusElement.innerHTML = '🔄 Продолжите регистрацию.'; statusElement.style.background = '#e2e3e5'; statusElement.style.color = '#383d41'; break; default: statusElement.innerHTML = ''; } } },false); } // Enhanced email check status function function updateEmailCheckStatus(type, message) { const statusElement = document.getElementById('emailCheckStatus'); if (!statusElement) return; statusElement.style.display = 'block'; switch(type) { case 'checking': statusElement.innerHTML = '<p style="color: var(--primary);">🔍 Проверяем статус подтверждения...</p>'; statusElement.className = 'email-check-status status-checking'; break; case 'success': statusElement.innerHTML = '<p style="color: #155724;">✅ ' + message + '</p>'; statusElement.className = 'email-check-status status-success'; break; case 'error': statusElement.innerHTML = '<p style="color: #721c24;">❌ ' + message + '</p>'; statusElement.className = 'email-check-status status-error'; break; case 'timeout': statusElement.innerHTML = '<p style="color: #856404;">⏰ ' + message + '</p>'; statusElement.className = 'email-check-status status-error'; break; } } // Helper function to clear all Telegram timers function clearTelegramTimers() { if (telegramTimerInterval) { clearInterval(telegramTimerInterval); telegramTimerInterval = null; } if (telegramStatusInterval) { clearInterval(telegramStatusInterval); telegramStatusInterval = null; } } // Helper function to clear all email timers function clearEmailTimers() { if (resendTimerInterval) { clearInterval(resendTimerInterval); resendTimerInterval = null; } if (emailCheckInterval) { clearInterval(emailCheckInterval); emailCheckInterval = null; } } </script> <script> // Login with Telegram function function loginWithTelegram() { const email = document.getElementById('loginEmail').value.trim(); // Clear previous errors clearErrors(['loginEmail']); // Validate email if (!email) { showError('loginEmail', 'Пожалуйста, введите ваш email'); return; } else if (!/\S+@\S+\.\S+/.test(email)) { showError('loginEmail', 'Пожалуйста, введите действительный email адрес'); return; } // Check if user exists and is verified checkUserForTelegramLogin(email); } // Check if user exists and is verified for Telegram login function checkUserForTelegramLogin(email) { const data = { type: 'check_user_for_telegram_login', email: email }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { if(response.user_exists && response.telegram_verified && response.email_verified){ // User exists and Telegram verified and email verifed- generate login link generateTelegramLoginLink(email); }else if (response.user_exists && response.telegram_verified) { // User exists and Telegram verified //alert('Для входа через Telegram необходимо сначала завершить регистрацию подтвердите email'); startTelegramRegistration("noneedname",email); } else if (response.user_exists && !response.telegram_verified) { // User exists but Telegram not verified //alert('Для входа через Telegram необходимо сначала завершить регистрацию в Telegram'); startTelegramRegistration("noneedname",email); } else { // User doesn't exist alert('Пользователь с таким email не найден. Пожалуйста, зарегистрируйтесь.'); } } else { alert('Ошибка: ' + response.error); } }); } // Generate Telegram login code function generateTelegramLoginLink(email) { const data = { type: 'generate_telegram_login_link', email: email }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Store user token localStorage.setItem('current_user_token', response.user_token); // Show Telegram verification modal for login showTelegramLoginModal(response.bot_username, response.deep_link, response.telegram_token_expires_remaining); // Close auth modal closeModal('authModal'); } else { alert('Ошибка: ' + response.error); } }); } // Show Telegram login modal function showTelegramLoginModal(botUsername, deepLink, expiresRemaining) { // Set Telegram bot deep link const telegramUrl = deepLink || `https://t.me/${botUsername}?start=login_${Date.now()}`; window.telegramBotUrl = telegramUrl; //open forced window.open(telegramUrl, '_blank'); // Generate QR code generateQRCode(telegramUrl); // Update modal text for login const modalText = document.getElementById('telegramModalText'); if (modalText) { modalText.innerHTML = ` Telegram был открыт для входа.<br> Если бот не открылся автоматически, используйте кнопку ниже или отсканируйте QR-код. `; } // Update modal title const modalTitle = document.querySelector('#telegramVerifyModal .modal-title'); if (modalTitle) { modalTitle.textContent = 'Вход через Telegram'; } // Start timer startTelegramTimer(expiresRemaining || 300); // Start status checking for login startTelegramLoginStatusCheck(); // Show modal document.getElementById('telegramVerifyModal').style.display = 'flex'; } // Start Telegram login status check function startTelegramLoginStatusCheck() { const userToken = localStorage.getItem('current_user_token'); // Clear existing interval if any if (telegramStatusInterval) { clearInterval(telegramStatusInterval); } // Check status every 5 seconds telegramStatusInterval = setInterval(function() { checkTelegramLoginStatus(userToken); }, 5000); } // Check Telegram login status function checkTelegramLoginStatus(userToken) { const data = { type: 'check_telegram_login_status', user_token: userToken }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { if (response.login_code_sended ) { // Login code received - show code input modal clearTelegramTimers(); showTelegramCodeInputModal(response.verify_code); } else if (response.login_completed) { // Login completed successfully clearTelegramTimers(); completeTelegramLogin(); } } }); } // Show Telegram code input modal function showTelegramCodeInputModal(verifyCode) { // Close Telegram verify modal closeTelegramVerifyModal(); // Create or show code input modal let codeModal = document.getElementById('telegramCodeModal'); // Start code timer startLoginCodeTimer(300); // Show modal codeModal.style.display = 'flex'; } // Start login code timer function startLoginCodeTimer(duration) { let timer = duration; const timerElement = document.getElementById('loginTimer'); if (!timerElement) return; // Clear existing timer if any if (window.loginCodeTimer) { clearInterval(window.loginCodeTimer); } window.loginCodeTimer = setInterval(function() { const minutes = parseInt(timer / 60, 10); const seconds = parseInt(timer % 60, 10); timerElement.textContent = minutes + ":" + (seconds < 10 ? "0" + seconds : seconds); if (--timer < 0) { clearInterval(window.loginCodeTimer); timerElement.textContent = "00:00"; // Show expired message const timerContainer = document.getElementById('loginCodeTimer'); if (timerContainer) { timerContainer.classList.add('timer-expired'); timerContainer.innerHTML = 'Время действия кода истекло. Пожалуйста, начните заново.'; } } }, 1000); } // Verify Telegram login code function verifyTelegramLoginCode() { const userToken = localStorage.getItem('current_user_token'); const codeInput = document.getElementById('telegramLoginCode'); const code = codeInput ? codeInput.value.trim() : ''; // Clear previous errors clearErrors(['telegramLoginCode']); if (!code) { showError('telegramLoginCode', 'Пожалуйста, введите код подтверждения'); return; } if (code.length !== 7) { showError('telegramLoginCode', 'Код должен содержать 7 цифр'); return; } const data = { type: 'verify_telegram_login_code', user_token: userToken, verify_code: code }; sendRequest('/ajax/', data, function(response) { if (response.status === 'ok') { // Clear timer if (window.loginCodeTimer) { clearInterval(window.loginCodeTimer); } localStorage.setItem('user_info', JSON.stringify(response.user)); // Close any open modals closeModal('telegramCodeModal'); closeModal('telegramVerifyModal'); // Show success message and redirect alert('Вход выполнен успешно!'); window.location.href = '/' + window.currentLang + '/profile/'; } else { showError('telegramLoginCode', response.error); } }); } </script> <!-- Add this JavaScript before closing body tag --> <script> // Animation on scroll document.addEventListener('DOMContentLoaded', function() { const fadeElements = document.querySelectorAll('.fade-in'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('visible'); } }); }, { threshold: 0.1 }); fadeElements.forEach(element => { observer.observe(element); }); // Add click handlers for project CTAs document.querySelectorAll('.project-cta').forEach(button => { button.addEventListener('click', function() { const projectTitle = this.closest('.project-card').querySelector('.project-title').textContent; alert(`Exploring: ${projectTitle}`); // In production, this would navigate to the appropriate page }); }); }); </script> <script> // Cookie consent management (function() { // Configuration const COOKIE_CONSENT_KEY = 'serpuls_cookie_consent'; const COOKIE_EXPIRY_DAYS = 365; // Create cookie consent banner if not already accepted function initCookieConsent() { // Check if user has already made a choice const consent = getCookieConsent(); if (consent !== null) { // User already made a choice, apply preferences applyCookiePreferences(consent); return; } // Create banner createCookieBanner(); } // Create the cookie banner HTML function createCookieBanner() { const banner = document.createElement('div'); banner.id = 'cookie-consent-banner'; banner.style.cssText = ` position: fixed; bottom: 0; left: 0; right: 0; background: white; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); padding: 1.5rem; z-index: 9999; border-top: 3px solid var(--primary, #4361ee); animation: slideUp 0.5s ease; `; // Add animation style if not exists if (!document.getElementById('cookie-animation-style')) { const style = document.createElement('style'); style.id = 'cookie-animation-style'; style.textContent = ` @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } `; document.head.appendChild(style); } banner.innerHTML = ` <div style="max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between;"> <div style="flex: 2; min-width: 280px;"> <h3 style="margin: 0 0 0.5rem 0; color: var(--dark, #212529); font-size: 1.25rem;">🍪 Cookie Consent</h3> <p style="margin: 0; color: var(--gray, #6c757d); line-height: 1.5;"> We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Read our <a href="/en/cookie/" style="color: var(--primary, #4361ee); text-decoration: underline;">Cookie Policy</a> and <a href="/en/privacy/" style="color: var(--primary, #4361ee); text-decoration: underline;">Privacy Policy</a>. </p> </div> <div style="display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;"> <button id="cookie-accept-all" style="padding: 0.75rem 1.5rem; background: linear-gradient(135deg, var(--primary, #4361ee), var(--secondary, #7209b7)); color: white; border: none; border-radius: var(--border-radius, 8px); font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(67,97,238,0.3);"> Accept All </button> <button id="cookie-accept-essential" style="padding: 0.75rem 1.5rem; background: white; color: var(--dark, #212529); border: 1px solid var(--gray, #6c757d); border-radius: var(--border-radius, 8px); font-weight: 600; cursor: pointer; transition: all 0.3s ease;"> Essential Only </button> <button id="cookie-settings" style="padding: 0.75rem 1.5rem; background: transparent; color: var(--primary, #4361ee); border: none; font-weight: 600; cursor: pointer; text-decoration: underline;"> Customize </button> </div> </div> `; document.body.appendChild(banner); // Add event listeners document.getElementById('cookie-accept-all').addEventListener('click', function() { acceptAllCookies(); }); document.getElementById('cookie-accept-essential').addEventListener('click', function() { acceptEssentialCookies(); }); document.getElementById('cookie-settings').addEventListener('click', function() { showCookieSettings(); }); } // Show cookie settings modal function showCookieSettings() { // Remove existing modal if any const existingModal = document.getElementById('cookie-settings-modal'); if (existingModal) existingModal.remove(); const modal = document.createElement('div'); modal.id = 'cookie-settings-modal'; modal.style.cssText = ` position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; animation: fadeIn 0.3s ease; `; modal.innerHTML = ` <div style="background: white; border-radius: var(--border-radius, 8px); max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.2);"> <div style="padding: 1.5rem; border-bottom: 1px solid #e9ecef;"> <h3 style="margin: 0; color: var(--dark, #212529);">Cookie Preferences</h3> </div> <div style="padding: 1.5rem;"> <p style="color: var(--gray, #6c757d); margin-bottom: 1.5rem;">Choose which cookies you allow. You can change these settings at any time.</p> <div style="margin-bottom: 1rem; padding: 1rem; background: #f8f9fa; border-radius: var(--border-radius, 8px);"> <label style="display: flex; align-items: center; gap: 0.75rem; cursor: not-allowed;"> <input type="checkbox" checked disabled style="width: 18px; height: 18px;"> <div> <strong style="color: var(--dark, #212529);">Essential Cookies</strong> <p style="margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--gray, #6c757d);">Required for the website to function. Cannot be disabled.</p> </div> </label> </div> <div style="margin-bottom: 1rem; padding: 1rem; background: #f8f9fa; border-radius: var(--border-radius, 8px);"> <label style="display: flex; align-items: center; gap: 0.75rem; cursor: pointer;"> <input type="checkbox" id="cookie-pref-analytics" checked style="width: 18px; height: 18px;"> <div> <strong style="color: var(--dark, #212529);">Analytics Cookies</strong> <p style="margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--gray, #6c757d);">Help us understand how visitors interact with our site.</p> </div> </label> </div> <div style="margin-bottom: 1rem; padding: 1rem; background: #f8f9fa; border-radius: var(--border-radius, 8px);"> <label style="display: flex; align-items: center; gap: 0.75rem; cursor: pointer;"> <input type="checkbox" id="cookie-pref-functional" checked style="width: 18px; height: 18px;"> <div> <strong style="color: var(--dark, #212529);">Functional Cookies</strong> <p style="margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--gray, #6c757d);">Remember your preferences and settings.</p> </div> </label> </div> <div style="margin-bottom: 1rem; padding: 1rem; background: #f8f9fa; border-radius: var(--border-radius, 8px);"> <label style="display: flex; align-items: center; gap: 0.75rem; cursor: pointer;"> <input type="checkbox" id="cookie-pref-targeting" checked style="width: 18px; height: 18px;"> <div> <strong style="color: var(--dark, #212529);">Targeting Cookies</strong> <p style="margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--gray, #6c757d);">Used to deliver relevant content and ads.</p> </div> </label> </div> </div> <div style="padding: 1.5rem; border-top: 1px solid #e9ecef; display: flex; gap: 1rem; justify-content: flex-end;"> <button id="cookie-save-preferences" style="padding: 0.75rem 1.5rem; background: linear-gradient(135deg, var(--primary, #4361ee), var(--secondary, #7209b7)); color: white; border: none; border-radius: var(--border-radius, 8px); font-weight: 600; cursor: pointer;"> Save Preferences </button> <button id="cookie-close-modal" style="padding: 0.75rem 1.5rem; background: white; color: var(--dark, #212529); border: 1px solid var(--gray, #6c757d); border-radius: var(--border-radius, 8px); font-weight: 600; cursor: pointer;"> Cancel </button> </div> </div> `; document.body.appendChild(modal); // Close modal handlers document.getElementById('cookie-close-modal').addEventListener('click', function() { modal.remove(); }); document.getElementById('cookie-save-preferences').addEventListener('click', function() { const preferences = { essential: true, // Always true analytics: document.getElementById('cookie-pref-analytics').checked, functional: document.getElementById('cookie-pref-functional').checked, targeting: document.getElementById('cookie-pref-targeting').checked }; saveCookiePreferences(preferences); modal.remove(); removeCookieBanner(); }); // Click outside to close modal.addEventListener('click', function(e) { if (e.target === modal) { modal.remove(); } }); } // Accept all cookies function acceptAllCookies() { const preferences = { essential: true, analytics: true, functional: true, targeting: true }; saveCookiePreferences(preferences); removeCookieBanner(); } // Accept only essential cookies function acceptEssentialCookies() { const preferences = { essential: true, analytics: false, functional: false, targeting: false }; saveCookiePreferences(preferences); removeCookieBanner(); } // Save cookie preferences function saveCookiePreferences(preferences) { // Save to cookie const expiryDate = new Date(); expiryDate.setDate(expiryDate.getDate() + COOKIE_EXPIRY_DAYS); const cookieValue = JSON.stringify(preferences); document.cookie = `${COOKIE_CONSENT_KEY}=${encodeURIComponent(cookieValue)}; expires=${expiryDate.toUTCString()}; path=/; SameSite=Lax`; // Apply preferences applyCookiePreferences(preferences); // Store in localStorage for quick access localStorage.setItem(COOKIE_CONSENT_KEY, cookieValue); // Optional: send event to analytics if (typeof window.gtag !== 'undefined' && preferences.analytics) { window.gtag('consent', 'update', { 'analytics_storage': 'granted' }); } } // Get cookie consent from cookie or localStorage function getCookieConsent() { // Try to get from cookie first const match = document.cookie.match(new RegExp('(^| )' + COOKIE_CONSENT_KEY + '=([^;]+)')); if (match) { try { return JSON.parse(decodeURIComponent(match[2])); } catch (e) { console.error('Error parsing cookie consent:', e); } } // Try localStorage const stored = localStorage.getItem(COOKIE_CONSENT_KEY); if (stored) { try { return JSON.parse(stored); } catch (e) { console.error('Error parsing localStorage consent:', e); } } return null; } // Apply cookie preferences (enable/disable features) function applyCookiePreferences(preferences) { if (!preferences) return; // Example: Disable analytics if not consented if (!preferences.analytics) { // Disable Google Analytics if present if (typeof window.gtag !== 'undefined') { window.gtag('consent', 'default', { 'analytics_storage': 'denied' }); } // Optionally remove existing analytics cookies // This is handled by the analytics script itself usually } // Disable targeting cookies if (!preferences.targeting) { // Disable ad-related tracking // Remove Facebook pixel, etc. } // Store preferences in data attribute for other scripts to check document.documentElement.setAttribute('data-cookie-consent', JSON.stringify(preferences)); // Dispatch event for other scripts to react window.dispatchEvent(new CustomEvent('cookieConsentChanged', { detail: preferences })); } // Remove cookie banner function removeCookieBanner() { const banner = document.getElementById('cookie-consent-banner'); if (banner) { banner.style.animation = 'slideDown 0.5s ease forwards'; setTimeout(() => { if (banner.parentNode) banner.remove(); }, 500); // Add slideDown animation if not exists if (!document.getElementById('cookie-animation-slidedown')) { const style = document.createElement('style'); style.id = 'cookie-animation-slidedown'; style.textContent = ` @keyframes slideDown { from { transform: translateY(0); } to { transform: translateY(100%); } } `; document.head.appendChild(style); } } } // Add a floating button to reopen cookie settings (optional) function addCookieSettingsButton() { const btn = document.createElement('button'); btn.id = 'cookie-settings-button'; btn.innerHTML = '🍪'; btn.setAttribute('aria-label', 'Cookie Settings'); btn.style.cssText = ` position: fixed; bottom: 20px; left: 20px; width: 48px; height: 48px; border-radius: 50%; background: white; border: 1px solid var(--gray, #6c757d); box-shadow: var(--box-shadow, 0 4px 6px rgba(0,0,0,0.1)); cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; z-index: 9998; transition: var(--transition, all 0.3s ease); opacity: 0.8; `; btn.addEventListener('mouseenter', function() { this.style.opacity = '1'; this.style.transform = 'scale(1.1)'; }); btn.addEventListener('mouseleave', function() { this.style.opacity = '0.8'; this.style.transform = 'scale(1)'; }); btn.addEventListener('click', function() { showCookieSettings(); }); document.body.appendChild(btn); } // Initialize on DOM ready if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initCookieConsent); } else { initCookieConsent(); } // Optional: Add settings button after consent is given window.addEventListener('cookieConsentChanged', function() { // Only show settings button if not already present if (!document.getElementById('cookie-settings-button')) { //addCookieSettingsButton(); } }); // If consent already exists, add settings button const existingConsent = getCookieConsent(); if (existingConsent && !document.getElementById('cookie-settings-button')) { document.addEventListener('DOMContentLoaded', function() { //addCookieSettingsButton(); }); } })(); </script> </body> </html>