(function () { 'use strict'; var links = document.querySelectorAll('.pixie-links a'); if (!links.length) return; /* ----------------------------------------------- Normalize a page key from pathname / hash / href ----------------------------------------------- */ function clean(value) { return String(value || '') .toLowerCase() .replace(/^https?:\/\/[^/]+/i, '') .replace(/[?#].*$/, '') .replace(/^\/+|\/+$/g, ''); } function pageFromValue(value) { var v = String(value || '').toLowerCase(); /* Hash links such as #products */ if (v.indexOf('#products') !== -1) return 'products'; if (v.indexOf('#about') !== -1) return 'about'; if (v.indexOf('#terms') !== -1) return 'terms'; if (v.indexOf('#faq') !== -1) return 'faq'; if (v.indexOf('#support') !== -1) return 'support'; if (v.indexOf('#home') !== -1) return 'home'; /* Separate Carrd pages such as /products */ var path = clean(v); if (/(^|\/)products?(\/|$)/.test(path)) return 'products'; if (/(^|\/)about(\/|$)/.test(path)) return 'about'; if (/(^|\/)(terms|terms-of-service)(\/|$)/.test(path)) return 'terms'; if (/(^|\/)faq(\/|$)/.test(path)) return 'faq'; if (/(^|\/)support(\/|$)/.test(path)) return 'support'; /* Root / index = Home */ if ( path === '' || path === 'index' || path === 'index.html' || path === 'home' ) { return 'home'; } return ''; } function currentPage() { /* If a page section/hash is active, prefer it */ var fromHash = pageFromValue(window.location.hash); if (fromHash) return fromHash; /* Otherwise use the actual page URL */ return pageFromValue(window.location.pathname); } function linkPage(link) { /* Optional manual data-page support */ if (link.dataset.page) { return String(link.dataset.page).toLowerCase(); } return pageFromValue(link.getAttribute('href')); } function updateActiveNav() { var activePage = currentPage(); links.forEach(function (link) { /* Remove the hard-coded Home active state first */ link.classList.remove('is-active'); if ( activePage && linkPage(link) === activePage ) { link.classList.add('is-active'); } }); } /* Initial page load */ updateActiveNav(); /* Carrd/hash navigation */ window.addEventListener( 'hashchange', updateActiveNav ); /* Also update immediately when a nav link is clicked */ links.forEach(function (link) { link.addEventListener( 'click', function () { links.forEach(function (item) { item.classList.remove('is-active'); }); link.classList.add('is-active'); } ); }); })();
PIXIEMODS AUDIO
Background Mix
Ready to play
(function(){ 'use strict'; var audio=document.getElementById('pixieMusicAudio'); var playButton=document.getElementById('pixieMusicPlay'); var playIcon=document.getElementById('pixieMusicPlayIcon'); var stopButton=document.getElementById('pixieMusicStop'); var muteButton=document.getElementById('pixieMusicMute'); var volume=document.getElementById('pixieMusicVolume'); var status=document.getElementById('pixieMusicStatus'); if(!audio||!playButton||!stopButton||!muteButton||!volume||!status){return;} audio.volume=.35; var lastVolume=.35; function paintVolume(){ var value=Math.round(audio.volume*100); volume.value=value; volume.style.background='linear-gradient(90deg,#FF69B3 0%,#FF69B3 '+value+'%,rgba(255,255,255,.12) '+value+'%,rgba(255,255,255,.12) 100%)'; } function showPlay(){ playIcon.innerHTML=''; playButton.setAttribute('aria-label','Play music'); } function showPause(){ playIcon.innerHTML=''; playButton.setAttribute('aria-label','Pause music'); } playButton.addEventListener('click',function(){ if(audio.paused){ var promise=audio.play(); if(promise&&promise.catch){ promise.catch(function(){status.textContent='Press play again';}); } }else{ audio.pause(); } }); stopButton.addEventListener('click',function(){ audio.pause(); try{audio.currentTime=0;}catch(e){} showPlay(); status.textContent='Stopped'; }); volume.addEventListener('input',function(){ var v=Math.max(0,Math.min(100,Number(volume.value)))/100; audio.volume=v; audio.muted=false; if(v>0){lastVolume=v;} paintVolume(); }); muteButton.addEventListener('click',function(){ if(audio.muted||audio.volume===0){ audio.muted=false; audio.volume=lastVolume||.35; }else{ lastVolume=audio.volume||.35; audio.muted=true; } paintVolume(); }); audio.addEventListener('play',function(){showPause();status.textContent='Now playing';}); audio.addEventListener('pause',function(){if(audio.currentTime>0&&!audio.ended){showPlay();status.textContent='Paused';}}); audio.addEventListener('ended',function(){showPlay();status.textContent='Finished';}); audio.addEventListener('error',function(){showPlay();status.textContent='Audio unavailable';}); paintVolume(); })();
PixieMods FiveM resources
Elevate Your Roleplay

Premium
FiveM
Mods

High-quality scripts, UI systems, and immersive content built for serious servers. Made by creators, for creators.

Optimized Performance
Engineered for smooth gameplay.
Escrow Protected
Shop with complete confidence.
Easy Setup
Simple installation & documentation.
Frequent Updates
Always improving, always evolving.
Premium Support
Real humans, real help.
Discover PixieMods

Clothing, scripts, jobs & resources built for serious RP servers.

(function () { 'use strict'; var button = document.getElementById( 'pixieStoreOpenButton' ); var trigger = document.getElementById( 'pixieStoreTrigger' ); if ( !button || !trigger ) { return; } /* ===================================================== OPEN PRODUCTS ===================================================== */ button.addEventListener( 'click', function () { var panel = document.getElementById( 'pixieStorePanel' ); if (!panel) { return; } panel.classList.add( 'is-open' ); panel.setAttribute( 'aria-hidden', 'false' ); button.classList.add( 'is-hidden' ); trigger.classList.add( 'is-open' ); setTimeout( function () { window.dispatchEvent( new Event('resize') ); }, 700 ); } ); /* ===================================================== CLOSE PRODUCTS — TOP OR BOTTOM BUTTON ===================================================== */ document.addEventListener( 'click', function (event) { var closeButton = event.target.closest( '.pixie-store-close-products' ); if (!closeButton) { return; } var panel = document.getElementById( 'pixieStorePanel' ); if (panel) { panel.classList.remove( 'is-open' ); panel.setAttribute( 'aria-hidden', 'true' ); } var details = document.getElementById( 'pixieStoreDetails' ); if (details) { details.classList.remove( 'is-open' ); details.setAttribute( 'aria-hidden', 'true' ); } button.classList.remove( 'is-hidden' ); trigger.classList.remove( 'is-open' ); setTimeout( function () { window.dispatchEvent( new Event('resize') ); }, 700 ); } ); })();
/* ===================================================== PIXIEMODS — SECTION 4 CATEGORIES + 3 PAGES PER CATEGORY + 8 PRODUCTS PER PAGE ===================================================== */ (function () { 'use strict'; var panel = document.getElementById( 'pixieStorePanel' ); var grid = document.getElementById( 'pixieStoreGrid' ); var categoryList = document.getElementById( 'pixieStoreCategoryList' ); var previousButton = document.getElementById( 'pixieStorePrev' ); var nextButton = document.getElementById( 'pixieStoreNext' ); var pageNumbers = document.getElementById( 'pixieStorePageNumbers' ); var bottomPage = document.getElementById( 'pixieStoreBottomPage' ); if ( !panel || !grid || !categoryList || !previousButton || !nextButton || !pageNumbers || !bottomPage ) { return; } /* ===================================================== SETTINGS ===================================================== */ var PRODUCTS_PER_PAGE = 8; var PAGES_PER_CATEGORY = 3; var PRODUCTS_PER_CATEGORY = PRODUCTS_PER_PAGE * PAGES_PER_CATEGORY; /* ===================================================== CATEGORY DATA ===================================================== */ var categoryData = { 'scripts-jobs': { label:'Scripts / Jobs', description:'A new PIXIEMODS gameplay resource built for serious FiveM roleplay servers.', highlights:'FiveM Ready|Optimized Code|Easy Configuration|Support Included' }, 'female-clothing': { label:'Female Clothing', description:'A new PIXIEMODS female clothing release designed for FiveM roleplay characters.', highlights:'FiveM Ready|Premium Design|Easy Installation|Support Included' }, 'male-clothing': { label:'Male Clothing', description:'A new PIXIEMODS male clothing release designed for FiveM roleplay characters.', highlights:'FiveM Ready|Premium Design|Easy Installation|Support Included' }, 'accessories': { label:'Accessories', description:'A new PIXIEMODS accessories collection created for FiveM roleplay characters.', highlights:'FiveM Ready|Premium Assets|Easy Installation|Support Included' }, 'mlos': { label:"MLO's", description:'A new PIXIEMODS MLO resource designed to bring immersive spaces to FiveM roleplay servers.', highlights:'FiveM Ready|Optimized Interior|Easy Installation|Support Included' } }; /* ===================================================== STATE ===================================================== */ var activeCategory = 'scripts-jobs'; var currentPage = 1; /* ===================================================== HELPER ===================================================== */ function make( tag, className, text ) { var element = document.createElement( tag ); if (className) { element.className = className; } if ( text !== undefined ) { element.textContent = text; } return element; } /* ===================================================== CREATE FAKE PRODUCT ===================================================== */ function getProduct( category, index ) { var data = categoryData[ category ]; return { name:'COMING SOON', type:data.label, description:data.description, highlights:data.highlights, tebex:'YOUR-TEBEX-STORE-LINK', number:index + 1 }; } /* ===================================================== CREATE CARD ===================================================== */ function createCard( product ) { var card = make( 'article', 'mood-brand-card' ); var image = make( 'div', 'mood-brand-image' ); var placeholder = make( 'div', 'mood-placeholder' ); placeholder.appendChild( make( 'div', 'mood-placeholder-logo', 'PIXIEMODS' ) ); image.appendChild( placeholder ); image.appendChild( make( 'div', 'mood-product-number', String( product.number ).padStart( 2, '0' ) ) ); image.appendChild( make( 'div', 'mood-product-chip', product.type ) ); card.appendChild( image ); var info = make( 'div', 'mood-brand-info' ); info.appendChild( make( 'h3', 'mood-brand-title', product.name ) ); info.appendChild( make( 'div', 'mood-brand-type', product.type ) ); var meta = make( 'div', 'mood-brand-meta' ); meta.appendChild( make( 'span', 'mood-status', 'Coming Soon' ) ); meta.appendChild( make( 'span', 'mood-product-index', String( product.number ).padStart( 2, '0' ) ) ); info.appendChild( meta ); var actions = make( 'div', 'mood-brand-actions' ); var detailsButton = make( 'button', 'mood-brand-btn mood-view-brand pixie-store-details-trigger', 'View Details →' ); detailsButton.type = 'button'; detailsButton.setAttribute( 'data-name', product.name ); detailsButton.setAttribute( 'data-type', product.type ); detailsButton.setAttribute( 'data-description', product.description ); detailsButton.setAttribute( 'data-highlights', product.highlights ); detailsButton.setAttribute( 'data-tebex', product.tebex ); var tebexButton = make( 'a', 'mood-brand-btn mood-buy-tebex', 'Tebex Store ↗' ); tebexButton.href = 'javascript:void(0)'; actions.appendChild( detailsButton ); actions.appendChild( tebexButton ); info.appendChild( actions ); card.appendChild( info ); return card; } /* ===================================================== PAGE NUMBERS ===================================================== */ function renderPageNumbers() { pageNumbers.innerHTML = ''; for ( var page = 1; page <= PAGES_PER_CATEGORY; page++ ) { var button = document.createElement( 'button' ); button.type = 'button'; button.className = 'mood-page-number'; button.textContent = String( page ).padStart( 2, '0' ); button.setAttribute( 'data-page', String( page ) ); if ( page === currentPage ) { button.classList.add( 'is-active' ); } button.addEventListener( 'click', function () { currentPage = parseInt( this.getAttribute( 'data-page' ), 10 ); if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); pageNumbers.appendChild( button ); } } /* ===================================================== RENDER CURRENT CATEGORY + CURRENT PAGE ===================================================== */ function render() { grid.innerHTML = ''; var start = ( currentPage - 1 ) * PRODUCTS_PER_PAGE; for ( var i = 0; i < PRODUCTS_PER_PAGE; i++ ) { var productIndex = start + i; if ( productIndex >= PRODUCTS_PER_CATEGORY ) { break; } grid.appendChild( createCard( getProduct( activeCategory, productIndex ) ) ); } renderPageNumbers(); previousButton.disabled = currentPage <= 1; nextButton.disabled = currentPage >= PAGES_PER_CATEGORY; bottomPage.textContent = categoryData[ activeCategory ].label + ' · Page ' + String( currentPage ).padStart( 2, '0' ) + ' / ' + String( PAGES_PER_CATEGORY ).padStart( 2, '0' ); } /* ===================================================== CATEGORY CLICK ===================================================== */ categoryList.addEventListener( 'click', function ( event ) { var button = event.target.closest( '.mood-category-button' ); if (!button) { return; } var category = button.getAttribute( 'data-category' ); if ( !category || !categoryData[ category ] ) { return; } activeCategory = category; currentPage = 1; categoryList .querySelectorAll( '.mood-category-button' ) .forEach( function ( item ) { item.classList.toggle( 'is-active', item === button ); } ); if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== PREVIOUS ===================================================== */ previousButton.addEventListener( 'click', function () { if ( currentPage <= 1 ) { return; } currentPage--; if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== NEXT ===================================================== */ nextButton.addEventListener( 'click', function () { if ( currentPage >= PAGES_PER_CATEGORY ) { return; } currentPage++; if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== INITIAL ===================================================== */ render(); })();
/* ===================================================== PIXIEMODS — SECTION 5 INLINE PRODUCT DETAILS ===================================================== */ (function () { 'use strict'; var panel = document.getElementById( 'pixieStorePanel' ); var details = document.getElementById( 'pixieStoreDetails' ); var title = document.getElementById( 'pixieStoreDetailTitle' ); var type = document.getElementById( 'pixieStoreDetailType' ); var description = document.getElementById( 'pixieStoreDetailDescription' ); var list = document.getElementById( 'pixieStoreDetailList' ); var visual = document.getElementById( 'pixieStoreVisualName' ); var buy = document.getElementById( 'pixieStoreDetailBuy' ); var close = document.getElementById( 'pixieStoreDetailClose' ); if ( !panel || !details || !title || !type || !description || !list || !visual || !buy || !close ) { return; } /* ===================================================== CLOSE DETAILS ===================================================== */ function closeDetails() { details.classList.remove( 'is-open' ); details.setAttribute( 'aria-hidden', 'true' ); } window.PixieStoreCloseProductDetails = closeDetails; /* ===================================================== OPEN DETAILS FROM ANY GENERATED CARD ===================================================== */ panel.addEventListener( 'click', function ( event ) { var button = event.target.closest( '.pixie-store-details-trigger' ); if (!button) { return; } var name = button.getAttribute( 'data-name' ) || 'COMING SOON'; var productType = button.getAttribute( 'data-type' ) || 'PIXIEMODS Resource'; var productDescription = button.getAttribute( 'data-description' ) || 'A new PIXIEMODS resource is currently in development.'; var productHighlights = ( button.getAttribute( 'data-highlights' ) || '' ).split( '|' ); var tebex = button.getAttribute( 'data-tebex' ) || 'YOUR-TEBEX-STORE-LINK'; title.textContent = name; type.textContent = productType; description.textContent = productDescription; visual.textContent = name; list.innerHTML = ''; productHighlights.forEach( function ( highlight ) { if (!highlight) { return; } var item = document.createElement( 'li' ); item.textContent = highlight; list.appendChild( item ); } ); if ( tebex && tebex !== 'YOUR-TEBEX-STORE-LINK' ) { buy.href = tebex; buy.target = '_blank'; buy.rel = 'noopener'; buy.classList.remove( 'is-disabled' ); } else { buy.href = 'javascript:void(0)'; buy.removeAttribute( 'target' ); buy.classList.add( 'is-disabled' ); } details.classList.add( 'is-open' ); details.setAttribute( 'aria-hidden', 'false' ); /* SMOOTHLY BRING DETAILS INTO VIEW BELOW THE GRID */ setTimeout( function () { var top = details .getBoundingClientRect() .top + window.pageYOffset - 82; window.scrollTo( { top:top, behavior:'smooth' } ); }, 80 ); } ); /* ===================================================== CLOSE DETAILS BUTTON ===================================================== */ close.addEventListener( 'click', closeDetails ); })();
(function () { 'use strict'; /* ===================================================== WAIT FOR CURRENT V2 STORE ===================================================== */ var attempts = 0; function boot() { var panel = document.getElementById( 'pixieStorePanel' ); var grid = document.getElementById( 'pixieStoreGrid' ); var oldCategoryList = document.getElementById( 'pixieStoreCategoryList' ); var oldPrev = document.getElementById( 'pixieStorePrev' ); var oldNext = document.getElementById( 'pixieStoreNext' ); var pageNumbers = document.getElementById( 'pixieStorePageNumbers' ); var bottomPage = document.getElementById( 'pixieStoreBottomPage' ); if ( !panel || !grid || !oldCategoryList || !oldPrev || !oldNext || !pageNumbers || !bottomPage ) { attempts++; if ( attempts < 80 ) { setTimeout( boot, 100 ); } return; } /* ===================================================== DO NOT BOOT TWICE ===================================================== */ if ( panel.getAttribute( 'data-pixie-slot-engine' ) === 'ready' ) { return; } panel.setAttribute( 'data-pixie-slot-engine', 'ready' ); /* ===================================================== REMOVE OLD SECTION 6 CLICK LISTENERS SAFELY CLONING KEEPS THE SAME HTML / CSS / IDs, BUT REMOVES THE OLD EVENT LISTENERS. ===================================================== */ var categoryList = oldCategoryList.cloneNode( true ); oldCategoryList.parentNode.replaceChild( categoryList, oldCategoryList ); var previousButton = oldPrev.cloneNode( true ); oldPrev.parentNode.replaceChild( previousButton, oldPrev ); var nextButton = oldNext.cloneNode( true ); oldNext.parentNode.replaceChild( nextButton, oldNext ); /* ===================================================== SETTINGS ===================================================== */ var PRODUCTS_PER_PAGE = 8; var PAGES_PER_CATEGORY = 3; var PRODUCTS_PER_CATEGORY = PRODUCTS_PER_PAGE * PAGES_PER_CATEGORY; /* ===================================================== CATEGORIES ===================================================== */ var categories = { 'scripts-jobs': { label:'Scripts / Jobs', description:'A new PIXIEMODS gameplay resource built for serious FiveM roleplay servers.', highlights:[ 'FiveM Ready', 'Optimized Code', 'Easy Configuration', 'Support Included' ] }, 'female-clothing': { label:'Female Clothing', description:'A new PIXIEMODS female clothing release designed for FiveM roleplay characters.', highlights:[ 'FiveM Ready', 'Premium Design', 'Easy Installation', 'Support Included' ] }, 'male-clothing': { label:'Male Clothing', description:'A new PIXIEMODS male clothing release designed for FiveM roleplay characters.', highlights:[ 'FiveM Ready', 'Premium Design', 'Easy Installation', 'Support Included' ] }, 'accessories': { label:'Accessories', description:'A new PIXIEMODS accessories collection created for FiveM roleplay characters.', highlights:[ 'FiveM Ready', 'Premium Assets', 'Easy Installation', 'Support Included' ] }, 'mlos': { label:"MLO's", description:'A new PIXIEMODS MLO resource designed to bring immersive spaces to FiveM roleplay servers.', highlights:[ 'FiveM Ready', 'Optimized Interior', 'Easy Installation', 'Support Included' ] } }; /* ===================================================== BUILD 24 PLACEHOLDER SLOTS PER CATEGORY ===================================================== */ var store = {}; Object.keys( categories ).forEach( function ( category ) { store[ category ] = []; for ( var i = 1; i <= PRODUCTS_PER_CATEGORY; i++ ) { store[ category ].push( { slot:i, name:'COMING SOON', type:categories[ category ].label, status:'Coming Soon', image:'', description:categories[ category ].description, highlights:categories[ category ].highlights.slice(), tebex:'', isPlaceholder:true } ); } } ); /* ===================================================== STATE ===================================================== */ var activeCategory = 'scripts-jobs'; var currentPage = 1; /* ===================================================== HELPERS ===================================================== */ function make( tag, className, text ) { var element = document.createElement( tag ); if ( className ) { element.className = className; } if ( text !== undefined ) { element.textContent = text; } return element; } function hasRealTebex( url ) { if (!url) { return false; } var value = String( url ).trim(); return ( value !== '' && value !== '#' && value !== 'YOUR-TEBEX-STORE-LINK' && value !== 'PASTE-REAL-TEBEX-LINK-HERE' && value.indexOf( 'javascript:' ) !== 0 ); } function normalizeHighlights( value, fallback ) { if ( Array.isArray( value ) ) { return value .filter( Boolean ) .map( function ( item ) { return String( item ); } ); } if ( typeof value === 'string' ) { return value .split( '|' ) .filter( Boolean ); } return fallback.slice(); } /* ===================================================== PUBLIC API USE THIS FROM NEW CARRD SECTIONS: PixieStoreSetProduct(category, slot, {...}) ===================================================== */ window.PixieStoreSetProduct = function ( category, slot, product ) { if ( !store[ category ] ) { return false; } var index = parseInt( slot, 10 ) - 1; if ( index < 0 || index >= PRODUCTS_PER_CATEGORY ) { return false; } var fallback = categories[ category ]; product = product || {}; store[ category ][ index ] = { slot:index + 1, name: product.name || 'COMING SOON', type: product.type || fallback.label, status: product.status || 'Available', image: product.image || '', description: product.description || fallback.description, highlights: normalizeHighlights( product.highlights, fallback.highlights ), tebex: product.tebex || '', isPlaceholder:false }; /* IF USER IS CURRENTLY VIEWING THIS CATEGORY/PAGE, UPDATE IMMEDIATELY. */ if ( activeCategory === category ) { var pageForSlot = Math.ceil( ( index + 1 ) / PRODUCTS_PER_PAGE ); if ( pageForSlot === currentPage ) { render(); } } return true; }; /* ===================================================== OPTIONAL: RETURN A SLOT TO COMING SOON ===================================================== */ window.PixieStoreResetProduct = function ( category, slot ) { if ( !store[ category ] ) { return false; } var index = parseInt( slot, 10 ) - 1; if ( index < 0 || index >= PRODUCTS_PER_CATEGORY ) { return false; } var fallback = categories[ category ]; store[ category ][ index ] = { slot:index + 1, name:'COMING SOON', type:fallback.label, status:'Coming Soon', image:'', description:fallback.description, highlights: fallback.highlights.slice(), tebex:'', isPlaceholder:true }; if ( activeCategory === category ) { render(); } return true; }; /* ===================================================== CARD ===================================================== */ function createCard( product ) { var card = make( 'article', 'mood-brand-card' ); var image = make( 'div', 'mood-brand-image' ); var placeholder = make( 'div', 'mood-placeholder' ); if ( product.image ) { var realImage = document.createElement( 'img' ); realImage.className = 'mood-product-real-image'; realImage.src = product.image; realImage.alt = product.name; placeholder.appendChild( realImage ); } else { placeholder.appendChild( make( 'div', 'mood-placeholder-logo', 'PIXIEMODS' ) ); } image.appendChild( placeholder ); image.appendChild( make( 'div', 'mood-product-number', String( product.slot ).padStart( 2, '0' ) ) ); image.appendChild( make( 'div', 'mood-product-chip', product.type ) ); card.appendChild( image ); /* INFO */ var info = make( 'div', 'mood-brand-info' ); info.appendChild( make( 'h3', 'mood-brand-title', product.name ) ); info.appendChild( make( 'div', 'mood-brand-type', product.type ) ); /* META */ var meta = make( 'div', 'mood-brand-meta' ); meta.appendChild( make( 'span', 'mood-status', product.status ) ); meta.appendChild( make( 'span', 'mood-product-index', String( product.slot ).padStart( 2, '0' ) ) ); info.appendChild( meta ); /* ACTIONS */ var actions = make( 'div', 'mood-brand-actions' ); var detailsButton = make( 'button', 'mood-brand-btn mood-view-brand pixie-store-details-trigger', 'View Details →' ); detailsButton.type = 'button'; detailsButton.setAttribute( 'data-name', product.name ); detailsButton.setAttribute( 'data-type', product.type ); detailsButton.setAttribute( 'data-description', product.description ); detailsButton.setAttribute( 'data-highlights', product.highlights.join( '|' ) ); detailsButton.setAttribute( 'data-tebex', product.tebex ); var tebexButton = make( 'a', 'mood-brand-btn mood-buy-tebex', 'Tebex Store ↗' ); if ( hasRealTebex( product.tebex ) ) { tebexButton.href = product.tebex; tebexButton.target = '_blank'; tebexButton.rel = 'noopener'; } else { tebexButton.href = 'javascript:void(0)'; tebexButton.classList.add( 'is-disabled' ); tebexButton.setAttribute( 'aria-disabled', 'true' ); } actions.appendChild( detailsButton ); actions.appendChild( tebexButton ); info.appendChild( actions ); card.appendChild( info ); return card; } /* ===================================================== PAGE NUMBERS ===================================================== */ function renderPageNumbers() { pageNumbers.innerHTML = ''; for ( var page = 1; page <= PAGES_PER_CATEGORY; page++ ) { var button = document.createElement( 'button' ); button.type = 'button'; button.className = 'mood-page-number'; button.textContent = String( page ).padStart( 2, '0' ); button.setAttribute( 'data-page', String( page ) ); if ( page === currentPage ) { button.classList.add( 'is-active' ); } pageNumbers.appendChild( button ); } } /* ===================================================== RENDER ===================================================== */ function render() { grid.innerHTML = ''; var start = ( currentPage - 1 ) * PRODUCTS_PER_PAGE; var visible = store[ activeCategory ].slice( start, start + PRODUCTS_PER_PAGE ); visible.forEach( function ( product ) { grid.appendChild( createCard( product ) ); } ); renderPageNumbers(); previousButton.disabled = currentPage <= 1; nextButton.disabled = currentPage >= PAGES_PER_CATEGORY; bottomPage.textContent = categories[ activeCategory ].label + ' · Page ' + String( currentPage ).padStart( 2, '0' ) + ' / ' + String( PAGES_PER_CATEGORY ).padStart( 2, '0' ); } /* ===================================================== CATEGORY CLICKS ===================================================== */ categoryList.addEventListener( 'click', function ( event ) { var button = event.target.closest( '.mood-category-button' ); if (!button) { return; } var category = button.getAttribute( 'data-category' ); if ( !store[ category ] ) { return; } activeCategory = category; currentPage = 1; categoryList .querySelectorAll( '.mood-category-button' ) .forEach( function ( item ) { item.classList.toggle( 'is-active', item === button ); } ); if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== PAGE NUMBER CLICK ===================================================== */ pageNumbers.addEventListener( 'click', function ( event ) { var button = event.target.closest( '.mood-page-number' ); if (!button) { return; } currentPage = parseInt( button.getAttribute( 'data-page' ), 10 ); if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== PREVIOUS / NEXT ===================================================== */ previousButton.addEventListener( 'click', function () { if ( currentPage <= 1 ) { return; } currentPage--; if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); nextButton.addEventListener( 'click', function () { if ( currentPage >= PAGES_PER_CATEGORY ) { return; } currentPage++; if ( window.PixieStoreCloseProductDetails ) { window.PixieStoreCloseProductDetails(); } render(); } ); /* ===================================================== PUBLIC REFRESH ===================================================== */ window.PixieStoreRefresh = render; /* ===================================================== INITIAL ===================================================== */ render(); } /* ===================================================== START ===================================================== */ boot(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'scripts-jobs', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: 'Scripts / Jobs', /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'female-clothing', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: 'Female Clothing', /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'male-clothing', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: 'Male Clothing', /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'accessories', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: 'Accessories', /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'mlos', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: "MLO's", /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
(function () { function addProduct() { if ( typeof window.PixieStoreSetProduct !== 'function' ) { setTimeout( addProduct, 100 ); return; } /* ===================================================== CATEGORY OPTIONS scripts-jobs female-clothing male-clothing accessories mlos ===================================================== */ window.PixieStoreSetProduct( /* CATEGORY */ 'scripts-jobs', /* SLOT 1–24 INSIDE THIS CATEGORY */ 1, { /* PRODUCT NAME */ name: 'YOUR PRODUCT NAME', /* SMALL TYPE TEXT */ type: 'Scripts / Jobs', /* STATUS SHOWN ON CARD */ status: 'Available', /* OPTIONAL PRODUCT IMAGE. LEAVE EMPTY "" TO KEEP THE PIXIEMODS PLACEHOLDER. */ image: '', /* DETAILS DESCRIPTION */ description: 'Write the full product description here.', /* DETAILS BULLETS. YOU CAN USE 4 OR MORE. */ highlights: [ 'FiveM Ready', 'Optimized', 'Easy Configuration', 'Support Included' ], /* PASTE THE REAL PRODUCT TEBEX URL. WHEN THIS IS A REAL URL: - CARD "TEBEX STORE" BUTTON BECOMES ACTIVE - DETAILS "VIEW ON TEBEX" BUTTON BECOMES ACTIVE */ tebex: 'PASTE-REAL-TEBEX-LINK-HERE' } ); } addProduct(); })();
/* ===================================================== PIXIEMODS — TERMS CONTROLLER V2 REPLACE ONLY TERMS SECTION 8 WITH THIS FILE WHAT THIS FIXES: - Terms opens from NAV or FOOTER - no page/hash navigation - Terms never stays selected in navbar - Home remains the active navbar item - works with href="#terms", "/#terms", full URLs ending in #terms, or any element with data-pixie-terms-open ===================================================== */ (function () { 'use strict'; var modal = document.getElementById( 'pixieTermsModal' ); var closeButton = document.getElementById( 'pixieTermsModalClose' ); var scrollArea = document.getElementById( 'pixieTermsScroll' ); var content = document.getElementById( 'pixieTermsContent' ); var title = document.getElementById( 'pixieTermsModalTitle' ); var languageButtons = document.querySelectorAll( '#pixieTermsModal [data-terms-lang]' ); if ( !modal || !closeButton || !scrollArea || !content || !languageButtons.length ) { return; } /* ===================================================== REMOVE OLD TEST MODAL IF IT STILL EXISTS ===================================================== */ var oldTest = document.getElementById( 'pixieNavModal' ); if (oldTest) { oldTest.remove(); } /* ===================================================== STATE ===================================================== */ var currentLanguage = 'en'; var previousOverflowHtml = ''; var previousOverflowBody = ''; /* ===================================================== KEEP NAVBAR ON HOME TERMS IS A MODAL, NOT A PAGE ===================================================== */ function keepHomeActive() { var nav = document.querySelector( '.pixie-links' ); if (!nav) { return; } var links = nav.querySelectorAll( 'a' ); links.forEach( function ( link ) { link.classList.remove( 'is-active' ); } ); /* PRIMARY HOME LINK */ var homeLink = nav.querySelector( 'a[href="#home"]' ); if (!homeLink) { homeLink = nav.querySelector( 'a[href="/"]' ); } if (homeLink) { homeLink.classList.add( 'is-active' ); } } /* ===================================================== CHECK WHETHER A CLICKED LINK IS A TERMS LINK WORKS FOR NAV + FOOTER ===================================================== */ function isTermsTrigger( element ) { if (!element) { return false; } /* MANUAL ATTRIBUTE OPTION: */ if ( element.matches && element.matches( '[data-pixie-terms-open]' ) ) { return true; } /* ANCHOR OPTION: #terms /#terms https://site.com/#terms */ if ( element.tagName !== 'A' ) { return false; } var rawHref = element.getAttribute( 'href' ); if (!rawHref) { return false; } if ( rawHref === '#terms' ) { return true; } try { var parsed = new URL( rawHref, window.location.href ); return ( parsed.hash === '#terms' ); } catch (error) { return false; } } /* ===================================================== RENDER LANGUAGE ===================================================== */ function renderLanguage( language ) { currentLanguage = language === 'gr' ? 'gr' : 'en'; content.innerHTML = ''; var ids = currentLanguage === 'gr' ? [ 'pixieTermsGR1Source', 'pixieTermsGR2Source', 'pixieTermsGR3Source' ] : [ 'pixieTermsEN1Source', 'pixieTermsEN2Source', 'pixieTermsEN3Source' ]; ids.forEach( function ( id ) { var template = document.getElementById( id ); if (!template) { return; } content.appendChild( template.content.cloneNode( true ) ); } ); languageButtons.forEach( function ( button ) { var active = button.getAttribute( 'data-terms-lang' ) === currentLanguage; button.classList.toggle( 'is-active', active ); } ); title.textContent = currentLanguage === 'gr' ? 'Όροι Χρήσης' : 'Terms & Conditions'; scrollArea.scrollTop = 0; } /* ===================================================== OPEN ===================================================== */ function openTerms() { renderLanguage( currentLanguage ); previousOverflowHtml = document.documentElement.style.overflow; previousOverflowBody = document.body.style.overflow; document.documentElement.style.overflow = 'hidden'; document.body.style.overflow = 'hidden'; modal.classList.add( 'is-open' ); modal.setAttribute( 'aria-hidden', 'false' ); /* THE NAV MUST STILL LOOK LIKE HOME. DO IT IMMEDIATELY + AFTER THE CLICK STACK FINISHES, IN CASE ANOTHER NAV SCRIPT TRIES TO ADD is-active. */ keepHomeActive(); setTimeout( keepHomeActive, 0 ); setTimeout( keepHomeActive, 80 ); setTimeout( function () { closeButton.focus(); }, 80 ); } /* ===================================================== CLOSE ===================================================== */ function closeTerms() { modal.classList.remove( 'is-open' ); modal.setAttribute( 'aria-hidden', 'true' ); document.documentElement.style.overflow = previousOverflowHtml; document.body.style.overflow = previousOverflowBody; /* STAY ON HOME VISUALLY AFTER CLOSE TOO */ keepHomeActive(); setTimeout( keepHomeActive, 0 ); } /* ===================================================== NAV + FOOTER TERMS CLICK CAPTURE MODE STOPS OLD PAGE/HASH/ACTION HANDLERS ===================================================== */ document.addEventListener( 'click', function ( event ) { var candidate = event.target.closest( 'a, [data-pixie-terms-open]' ); if ( !isTermsTrigger( candidate ) ) { return; } event.preventDefault(); event.stopImmediatePropagation(); openTerms(); }, true ); /* ===================================================== LANGUAGE SWITCH + OUTSIDE CLOSE ===================================================== */ modal.addEventListener( 'click', function ( event ) { var languageButton = event.target.closest( '[data-terms-lang]' ); if (languageButton) { renderLanguage( languageButton.getAttribute( 'data-terms-lang' ) ); return; } if ( event.target === modal ) { closeTerms(); } } ); /* ===================================================== X CLOSE ===================================================== */ closeButton.addEventListener( 'click', closeTerms ); /* ===================================================== ESC CLOSE ===================================================== */ document.addEventListener( 'keydown', function ( event ) { if ( event.key === 'Escape' && modal.classList.contains( 'is-open' ) ) { closeTerms(); } } ); /* ===================================================== INITIAL ===================================================== */ renderLanguage( 'en' ); keepHomeActive(); })();
/* ===================================================== PIXIEMODS — ABOUT CONTROLLER SECTION 4 NAV + FOOTER ABOUT: - opens modal - no page change - no hash change - Home remains selected ===================================================== */ (function () { 'use strict'; var modal = document.getElementById( 'pixieAboutModal' ); var closeButton = document.getElementById( 'pixieAboutModalClose' ); var scrollArea = document.getElementById( 'pixieAboutScroll' ); var content = document.getElementById( 'pixieAboutContent' ); var title = document.getElementById( 'pixieAboutModalTitle' ); var languageButtons = document.querySelectorAll( '#pixieAboutModal [data-about-lang]' ); if ( !modal || !closeButton || !scrollArea || !content || !languageButtons.length ) { return; } var currentLanguage = 'en'; var previousOverflowHtml = ''; var previousOverflowBody = ''; /* ===================================================== KEEP NAVBAR ON HOME ===================================================== */ function keepHomeActive() { var nav = document.querySelector( '.pixie-links' ); if (!nav) { return; } var links = nav.querySelectorAll( 'a' ); links.forEach( function ( link ) { link.classList.remove( 'is-active' ); } ); var homeLink = nav.querySelector( 'a[href="#home"]' ); if (!homeLink) { homeLink = nav.querySelector( 'a[href="/"]' ); } if (homeLink) { homeLink.classList.add( 'is-active' ); } } /* ===================================================== ABOUT LINK DETECTION NAV + FOOTER + FULL URL ===================================================== */ function isAboutTrigger( element ) { if (!element) { return false; } if ( element.matches && element.matches( '[data-pixie-about-open]' ) ) { return true; } if ( element.tagName !== 'A' ) { return false; } var rawHref = element.getAttribute( 'href' ); if (!rawHref) { return false; } if ( rawHref === '#about' ) { return true; } try { var parsed = new URL( rawHref, window.location.href ); return ( parsed.hash === '#about' ); } catch (error) { return false; } } /* ===================================================== RENDER LANGUAGE ===================================================== */ function renderLanguage( language ) { currentLanguage = language === 'gr' ? 'gr' : 'en'; content.innerHTML = ''; var sourceId = currentLanguage === 'gr' ? 'pixieAboutGRSource' : 'pixieAboutENSource'; var template = document.getElementById( sourceId ); if (template) { content.appendChild( template.content.cloneNode( true ) ); } languageButtons.forEach( function ( button ) { var active = button.getAttribute( 'data-about-lang' ) === currentLanguage; button.classList.toggle( 'is-active', active ); } ); title.textContent = currentLanguage === 'gr' ? 'Σχετικά με την PixieMods' : 'About PixieMods'; scrollArea.scrollTop = 0; } /* ===================================================== OPEN ===================================================== */ function openAbout() { renderLanguage( currentLanguage ); previousOverflowHtml = document.documentElement.style.overflow; previousOverflowBody = document.body.style.overflow; document.documentElement.style.overflow = 'hidden'; document.body.style.overflow = 'hidden'; modal.classList.add( 'is-open' ); modal.setAttribute( 'aria-hidden', 'false' ); keepHomeActive(); setTimeout( keepHomeActive, 0 ); setTimeout( keepHomeActive, 80 ); setTimeout( function () { closeButton.focus(); }, 80 ); } /* ===================================================== CLOSE ===================================================== */ function closeAbout() { modal.classList.remove( 'is-open' ); modal.setAttribute( 'aria-hidden', 'true' ); document.documentElement.style.overflow = previousOverflowHtml; document.body.style.overflow = previousOverflowBody; keepHomeActive(); setTimeout( keepHomeActive, 0 ); } /* ===================================================== INTERCEPT NAV + FOOTER ABOUT ===================================================== */ document.addEventListener( 'click', function ( event ) { var candidate = event.target.closest( 'a, [data-pixie-about-open]' ); if ( !isAboutTrigger( candidate ) ) { return; } event.preventDefault(); event.stopImmediatePropagation(); openAbout(); }, true ); /* ===================================================== LANGUAGE + OUTSIDE CLICK ===================================================== */ modal.addEventListener( 'click', function ( event ) { var languageButton = event.target.closest( '[data-about-lang]' ); if (languageButton) { renderLanguage( languageButton.getAttribute( 'data-about-lang' ) ); return; } if ( event.target === modal ) { closeAbout(); } } ); /* ===================================================== X CLOSE ===================================================== */ closeButton.addEventListener( 'click', closeAbout ); /* ===================================================== ESC CLOSE ===================================================== */ document.addEventListener( 'keydown', function ( event ) { if ( event.key === 'Escape' && modal.classList.contains( 'is-open' ) ) { closeAbout(); } } ); /* ===================================================== INITIAL ===================================================== */ renderLanguage( 'en' ); keepHomeActive(); })();
/* ===================================================== PIXIEMODS — FAQ CONTROLLER SECTION 4 ===================================================== */ (function () { 'use strict'; var modal = document.getElementById( 'pixieFaqModal' ); var closeButton = document.getElementById( 'pixieFaqModalClose' ); var scrollArea = document.getElementById( 'pixieFaqScroll' ); var content = document.getElementById( 'pixieFaqContent' ); var title = document.getElementById( 'pixieFaqModalTitle' ); var languageButtons = document.querySelectorAll( '#pixieFaqModal [data-faq-lang]' ); if ( !modal || !closeButton || !scrollArea || !content || !languageButtons.length ) { return; } var currentLanguage = 'en'; var previousOverflowHtml = ''; var previousOverflowBody = ''; /* ===================================================== KEEP NAVBAR ON HOME ===================================================== */ function keepHomeActive() { var nav = document.querySelector( '.pixie-links' ); if (!nav) { return; } var links = nav.querySelectorAll( 'a' ); links.forEach( function ( link ) { link.classList.remove( 'is-active' ); } ); var homeLink = nav.querySelector( 'a[href="#home"]' ); if (!homeLink) { homeLink = nav.querySelector( 'a[href="/"]' ); } if (homeLink) { homeLink.classList.add( 'is-active' ); } } /* ===================================================== FAQ LINK DETECTION NAV + FOOTER + FULL URL ===================================================== */ function isFaqTrigger( element ) { if (!element) { return false; } if ( element.matches && element.matches( '[data-pixie-faq-open]' ) ) { return true; } if ( element.tagName !== 'A' ) { return false; } var rawHref = element.getAttribute( 'href' ); if (!rawHref) { return false; } if ( rawHref === '#faq' ) { return true; } try { var parsed = new URL( rawHref, window.location.href ); return ( parsed.hash === '#faq' ); } catch (error) { return false; } } /* ===================================================== RENDER LANGUAGE ===================================================== */ function renderLanguage( language ) { currentLanguage = language === 'gr' ? 'gr' : 'en'; content.innerHTML = ''; var sourceId = currentLanguage === 'gr' ? 'pixieFaqGRSource' : 'pixieFaqENSource'; var template = document.getElementById( sourceId ); if (template) { content.appendChild( template.content.cloneNode( true ) ); } languageButtons.forEach( function ( button ) { var active = button.getAttribute( 'data-faq-lang' ) === currentLanguage; button.classList.toggle( 'is-active', active ); } ); title.textContent = currentLanguage === 'gr' ? 'Συχνές Ερωτήσεις' : 'Frequently Asked Questions'; scrollArea.scrollTop = 0; } /* ===================================================== OPEN ===================================================== */ function openFaq() { renderLanguage( currentLanguage ); previousOverflowHtml = document.documentElement.style.overflow; previousOverflowBody = document.body.style.overflow; document.documentElement.style.overflow = 'hidden'; document.body.style.overflow = 'hidden'; modal.classList.add( 'is-open' ); modal.setAttribute( 'aria-hidden', 'false' ); keepHomeActive(); setTimeout( keepHomeActive, 0 ); setTimeout( keepHomeActive, 80 ); setTimeout( function () { closeButton.focus(); }, 80 ); } /* ===================================================== CLOSE ===================================================== */ function closeFaq() { modal.classList.remove( 'is-open' ); modal.setAttribute( 'aria-hidden', 'true' ); document.documentElement.style.overflow = previousOverflowHtml; document.body.style.overflow = previousOverflowBody; keepHomeActive(); setTimeout( keepHomeActive, 0 ); } /* ===================================================== NAV + FOOTER FAQ ===================================================== */ document.addEventListener( 'click', function ( event ) { var candidate = event.target.closest( 'a, [data-pixie-faq-open]' ); if ( !isFaqTrigger( candidate ) ) { return; } event.preventDefault(); event.stopImmediatePropagation(); openFaq(); }, true ); /* ===================================================== MODAL CLICKS ===================================================== */ modal.addEventListener( 'click', function ( event ) { /* LANGUAGE */ var languageButton = event.target.closest( '[data-faq-lang]' ); if (languageButton) { renderLanguage( languageButton.getAttribute( 'data-faq-lang' ) ); return; } /* ACCORDION */ var question = event.target.closest( '.pixie-faq-question' ); if (question) { var item = question.closest( '.pixie-faq-item' ); if (!item) { return; } var alreadyOpen = item.classList.contains( 'is-open' ); content .querySelectorAll( '.pixie-faq-item.is-open' ) .forEach( function ( openItem ) { openItem.classList.remove( 'is-open' ); } ); if ( !alreadyOpen ) { item.classList.add( 'is-open' ); } return; } /* OUTSIDE */ if ( event.target === modal ) { closeFaq(); } } ); /* ===================================================== X CLOSE ===================================================== */ closeButton.addEventListener( 'click', closeFaq ); /* ===================================================== ESC CLOSE ===================================================== */ document.addEventListener( 'keydown', function ( event ) { if ( event.key === 'Escape' && modal.classList.contains( 'is-open' ) ) { closeFaq(); } } ); /* ===================================================== INITIAL ===================================================== */ renderLanguage( 'en' ); keepHomeActive(); })();
/* ===================================================== PIXIEMODS — SUPPORT CONTROLLER SECTION 4 NAV + FOOTER SUPPORT: - opens modal - no page change - no hash change - Home remains selected ===================================================== */ (function () { 'use strict'; var modal = document.getElementById( 'pixieSupportModal' ); var closeButton = document.getElementById( 'pixieSupportModalClose' ); var scrollArea = document.getElementById( 'pixieSupportScroll' ); var content = document.getElementById( 'pixieSupportContent' ); var title = document.getElementById( 'pixieSupportModalTitle' ); var languageButtons = document.querySelectorAll( '#pixieSupportModal [data-support-lang]' ); if ( !modal || !closeButton || !scrollArea || !content || !languageButtons.length ) { return; } var currentLanguage = 'en'; var previousOverflowHtml = ''; var previousOverflowBody = ''; /* ===================================================== KEEP NAVBAR ON HOME ===================================================== */ function keepHomeActive() { var nav = document.querySelector( '.pixie-links' ); if (!nav) { return; } var links = nav.querySelectorAll( 'a' ); links.forEach( function ( link ) { link.classList.remove( 'is-active' ); } ); var homeLink = nav.querySelector( 'a[href="#home"]' ); if (!homeLink) { homeLink = nav.querySelector( 'a[href="/"]' ); } if (homeLink) { homeLink.classList.add( 'is-active' ); } } /* ===================================================== SUPPORT LINK DETECTION NAV + FOOTER + FULL URL ===================================================== */ function isSupportTrigger( element ) { if (!element) { return false; } if ( element.matches && element.matches( '[data-pixie-support-open]' ) ) { return true; } if ( element.tagName !== 'A' ) { return false; } var rawHref = element.getAttribute( 'href' ); if (!rawHref) { return false; } if ( rawHref === '#support' ) { return true; } try { var parsed = new URL( rawHref, window.location.href ); return ( parsed.hash === '#support' ); } catch (error) { return false; } } /* ===================================================== RENDER LANGUAGE ===================================================== */ function renderLanguage( language ) { currentLanguage = language === 'gr' ? 'gr' : 'en'; content.innerHTML = ''; var sourceId = currentLanguage === 'gr' ? 'pixieSupportGRSource' : 'pixieSupportENSource'; var template = document.getElementById( sourceId ); if (template) { content.appendChild( template.content.cloneNode( true ) ); } languageButtons.forEach( function ( button ) { var active = button.getAttribute( 'data-support-lang' ) === currentLanguage; button.classList.toggle( 'is-active', active ); } ); title.textContent = currentLanguage === 'gr' ? 'Πώς μπορούμε να βοηθήσουμε;' : 'How can we help?'; scrollArea.scrollTop = 0; } /* ===================================================== OPEN ===================================================== */ function openSupport() { renderLanguage( currentLanguage ); previousOverflowHtml = document.documentElement.style.overflow; previousOverflowBody = document.body.style.overflow; document.documentElement.style.overflow = 'hidden'; document.body.style.overflow = 'hidden'; modal.classList.add( 'is-open' ); modal.setAttribute( 'aria-hidden', 'false' ); keepHomeActive(); setTimeout( keepHomeActive, 0 ); setTimeout( keepHomeActive, 80 ); setTimeout( function () { closeButton.focus(); }, 80 ); } /* ===================================================== CLOSE ===================================================== */ function closeSupport() { modal.classList.remove( 'is-open' ); modal.setAttribute( 'aria-hidden', 'true' ); document.documentElement.style.overflow = previousOverflowHtml; document.body.style.overflow = previousOverflowBody; keepHomeActive(); setTimeout( keepHomeActive, 0 ); } /* ===================================================== NAV + FOOTER SUPPORT ===================================================== */ document.addEventListener( 'click', function ( event ) { var candidate = event.target.closest( 'a, [data-pixie-support-open]' ); if ( !isSupportTrigger( candidate ) ) { return; } event.preventDefault(); event.stopImmediatePropagation(); openSupport(); }, true ); /* ===================================================== MODAL CLICKS ===================================================== */ modal.addEventListener( 'click', function ( event ) { var languageButton = event.target.closest( '[data-support-lang]' ); if (languageButton) { renderLanguage( languageButton.getAttribute( 'data-support-lang' ) ); return; } if ( event.target === modal ) { closeSupport(); } } ); /* ===================================================== X CLOSE ===================================================== */ closeButton.addEventListener( 'click', closeSupport ); /* ===================================================== ESC CLOSE ===================================================== */ document.addEventListener( 'keydown', function ( event ) { if ( event.key === 'Escape' && modal.classList.contains( 'is-open' ) ) { closeSupport(); } } ); /* ===================================================== INITIAL ===================================================== */ renderLanguage( 'en' ); keepHomeActive(); })();
/* ===================================================== PIXIEMODS — EMAIL PRIVACY CONTROLLER SECTION 3 ===================================================== */ (function(){ 'use strict'; var modal=document.getElementById('pixieEmailPrivacyModal'); var closeButton=document.getElementById('pixieEmailPrivacyClose'); var scrollArea=document.getElementById('pixieEmailPrivacyScroll'); var content=document.getElementById('pixieEmailPrivacyContent'); var title=document.getElementById('pixieEmailPrivacyTitle'); var languageButtons=document.querySelectorAll('#pixieEmailPrivacyModal [data-email-lang]'); if(!modal||!closeButton||!scrollArea||!content||!languageButtons.length){return;} var currentLanguage='en'; var previousOverflowHtml=''; var previousOverflowBody=''; function keepHomeActive(){ var nav=document.querySelector('.pixie-links'); if(!nav){return;} nav.querySelectorAll('a').forEach(function(link){link.classList.remove('is-active');}); var homeLink=nav.querySelector('a[href="#home"]')||nav.querySelector('a[href="/"]'); if(homeLink){homeLink.classList.add('is-active');} } function isTrigger(element){ if(!element){return false;} if(element.matches&&element.matches('[data-pixie-email-privacy-open]')){return true;} if(element.tagName!=='A'){return false;} var rawHref=element.getAttribute('href'); if(!rawHref){return false;} if(rawHref==='#email-privacy'){return true;} try{return new URL(rawHref,window.location.href).hash==='#email-privacy';} catch(error){return false;} } function renderLanguage(language){ currentLanguage=language==='gr'?'gr':'en'; content.innerHTML=''; var id=currentLanguage==='gr'?'pixieEmailPrivacyGR':'pixieEmailPrivacyEN'; var template=document.getElementById(id); if(template){content.appendChild(template.content.cloneNode(true));} languageButtons.forEach(function(button){ button.classList.toggle('is-active',button.getAttribute('data-email-lang')===currentLanguage); }); title.textContent=currentLanguage==='gr'?'Email & Απόρρητο':'Email & Privacy Notice'; scrollArea.scrollTop=0; } function openModal(){ renderLanguage(currentLanguage); previousOverflowHtml=document.documentElement.style.overflow; previousOverflowBody=document.body.style.overflow; document.documentElement.style.overflow='hidden'; document.body.style.overflow='hidden'; modal.classList.add('is-open'); modal.setAttribute('aria-hidden','false'); keepHomeActive(); setTimeout(keepHomeActive,0); setTimeout(function(){closeButton.focus();},70); } function closeModal(){ modal.classList.remove('is-open'); modal.setAttribute('aria-hidden','true'); document.documentElement.style.overflow=previousOverflowHtml; document.body.style.overflow=previousOverflowBody; keepHomeActive(); setTimeout(keepHomeActive,0); } document.addEventListener('click',function(event){ var candidate=event.target.closest('a, [data-pixie-email-privacy-open]'); if(!isTrigger(candidate)){return;} event.preventDefault(); event.stopImmediatePropagation(); openModal(); },true); modal.addEventListener('click',function(event){ var lang=event.target.closest('[data-email-lang]'); if(lang){renderLanguage(lang.getAttribute('data-email-lang'));return;} if(event.target===modal){closeModal();} }); closeButton.addEventListener('click',closeModal); document.addEventListener('keydown',function(event){ if(event.key==='Escape'&&modal.classList.contains('is-open')){closeModal();} }); renderLanguage('en'); keepHomeActive(); })();