From d3d4573f43fc3de8adcb3f85af5d70e19e076c17 Mon Sep 17 00:00:00 2001 From: DerpmanDev Date: Wed, 6 Mar 2024 02:10:34 +0000 Subject: [PATCH] Advertisements --- static/404.html | 1 - static/apps.html | 2 +- static/assets/js/apps.js | 38 +++++++++++++++++++++----------------- static/assets/js/home.js | 33 +++++++++++++++++++++++++++++++-- static/gms.html | 1 - static/index.html | 2 +- 6 files changed, 54 insertions(+), 23 deletions(-) diff --git a/static/404.html b/static/404.html index 51ad4f6d..779ba8b8 100644 --- a/static/404.html +++ b/static/404.html @@ -44,6 +44,5 @@

404 Not Found

Partners - \ No newline at end of file diff --git a/static/apps.html b/static/apps.html index 97ee48a4..d6511304 100644 --- a/static/apps.html +++ b/static/apps.html @@ -44,6 +44,6 @@ - + \ No newline at end of file diff --git a/static/assets/js/apps.js b/static/assets/js/apps.js index 4fa043ec..a1fba6b7 100644 --- a/static/assets/js/apps.js +++ b/static/assets/js/apps.js @@ -112,24 +112,28 @@ document.getElementById('searchApps').addEventListener('input', function(event) loadApps(); -/* ads -atOptions = { - 'key': 'f1818624979d7b153c0194b4c3ce4d7e', - 'format': 'iframe', - 'height': 60, - 'width': 468, - 'params': {} +/* +var scriptElement = document.createElement('script'); +scriptElement.type = 'text/javascript'; +scriptElement.innerHTML = `atOptions = { + 'key': 'f1818624979d7b153c0194b4c3ce4d7e', + 'format': 'iframe', + 'height': 60, + 'width': 468, + 'params': {} }; document.write(''); +`; +document.body.appendChild(scriptElement); -function centerIframe() { - var adFrame = document.querySelector('iframe'); - var containerWidth = adFrame.parentElement.clientWidth; - var adFrameWidth = adFrame.clientWidth; - var marginLeft = (containerWidth - adFrameWidth) / 2 + 'px'; - adFrame.style.marginLeft = marginLeft; - adFrame.style.borderRadius = '10px'; -} - -setInterval(centerIframe, 900); +window.onload = function() { + function centerIframe() { + var adFrame = document.querySelector('iframe'); + var containerWidth = adFrame.parentElement.clientWidth; + var adFrameWidth = adFrame.clientWidth; + var marginLeft = (containerWidth - adFrameWidth) / 2 + 'px'; + adFrame.style.marginLeft = marginLeft; + } + setInterval(centerIframe, 900); +}; */ \ No newline at end of file diff --git a/static/assets/js/home.js b/static/assets/js/home.js index d9f1a3a2..110d7989 100644 --- a/static/assets/js/home.js +++ b/static/assets/js/home.js @@ -9,7 +9,7 @@ function loadScript(src, callback) { loadScript('/uv/uv.handler.js', function () { loadScript('/uv/uv.bundle.js', function () { loadScript('/uv/uv.config.js', function () { - console.log('Complete'); + console.log('Loaded assets'); }); }); }); @@ -75,4 +75,33 @@ let regexp = /android|iphone|kindle|ipad/i; let isMobileDevice = regexp.test(details); if (isMobileDevice) { window.location.href = '/mobile.html'; -} \ No newline at end of file +} + +/* +var scriptElement = document.createElement('script'); +scriptElement.type = 'text/javascript'; +scriptElement.innerHTML = ` + atOptions = { + 'key' : 'fc0ad22bd8c1ea22c8c08df927121e8f', + 'format' : 'iframe', + 'height' : 60, + 'width' : 468, + 'params' : {} + }; + document.write(''); +`; +document.body.appendChild(scriptElement); + +window.onload = function() { + var adFrame = document.querySelector('iframe'); + if (adFrame) { + adFrame.style.borderRadius = '10px'; + adFrame.style.position = 'absolute'; + adFrame.style.bottom = '1%'; + adFrame.style.left = '50%'; // Set left to 50% + adFrame.style.transform = 'translateX(-50%)'; // Center horizontally using translateX + } else { + console.error('Iframe not found on the page.'); + } +}; +*/ \ No newline at end of file diff --git a/static/gms.html b/static/gms.html index be7ff2a9..c361f116 100644 --- a/static/gms.html +++ b/static/gms.html @@ -44,6 +44,5 @@ - \ No newline at end of file diff --git a/static/index.html b/static/index.html index fe9722c6..ad0ce43a 100644 --- a/static/index.html +++ b/static/index.html @@ -47,8 +47,8 @@ Partners - + \ No newline at end of file