From 7294bb6385c87fd5790a78285d31d03ac62d4cbd Mon Sep 17 00:00:00 2001 From: avadhesh18 Date: Tue, 18 Jun 2024 22:11:14 +0530 Subject: [PATCH] fixed infinite scroll --- public/functions.js | 17 +++++++++++------ run.php | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/public/functions.js b/public/functions.js index f8addff..501128c 100644 --- a/public/functions.js +++ b/public/functions.js @@ -86,7 +86,7 @@ titlesx = titlesx.replace("/.json", ""); document.title = titlesx; posts = jsonResponse['data']['children']; for(var item in posts) { -console.log("xx" + item); +//console.log("xx" + item); pid = posts[item]['data']; fill += postbuilder(pid); } @@ -103,6 +103,7 @@ document.getElementById('body').innerHTML = fill; document.getElementById('body').insertAdjacentHTML("afterbegin",''); runhsl(); if(curinfi == "true") { + // console.log('running observe'); observe(); } @@ -127,7 +128,7 @@ async function makereq(url) { let posts = jsonResponse['data']['children']; for (let item of posts) { - console.log("xx" + item); + // console.log("xx" + item); let pid = item['data']; fill += postbuilder(pid); } @@ -135,12 +136,14 @@ async function makereq(url) { fill += ''; document.getElementById('body').innerHTML = fill; @@ -157,7 +160,9 @@ async function makereq(url) { } function scorllmore() { + const url = nexturl; + let fill = ''; if(nexturl != '') {console.log(nexturl); } else {return false;} var req = new XMLHttpRequest(); @@ -192,15 +197,15 @@ nexturl = ''; req.send(null); } function axit(){ - localStorage.setItem('appshown', 'yes'); + localStorage.setItem('appshown1', 'yes'); document.getElementById('rdxapp').style.display = 'none'; } function observe() { - if (localStorage.getItem('appshown') !== 'yes') { + if (localStorage.getItem('appshown1') !== 'yes') { - document.getElementById('body').insertAdjacentHTML("afterbegin",'
rdx iPhone app is here Install X
'); + document.getElementById('body').insertAdjacentHTML("afterbegin",'
rdx iPhone app v1.2 is here Install X
'); } const options = { root: null, diff --git a/run.php b/run.php index b0941d0..9df0a47 100644 --- a/run.php +++ b/run.php @@ -56,7 +56,7 @@ { $data = str_replace('','

Explore RDX for Reddit: A Fast and Light weight Web Viewer Inspired by Apollo

-

Discover a seamless Reddit browsing experience with rdx, a mobile-friendly web viewer designed for speed and simplicity. Based on the now closed Apollo app, rdx allows you to navigate Reddit without the distraction of ads.

+

Discover a seamless Reddit browsing experience with rdx, a mobile-friendly web viewer designed for speed and simplicity. Based on the now closed Apollo app, rdx allows you to navigate Reddit without the distraction of ads.

Enjoy Reddit Anywhere: rdx\'s Mobile Friendly Design and Dark Mode

Experience the freedom of browsing Reddit on the mobile easily with rdx\'s mobile-friendly design. The interface is optimized for various devices, ensuring a smooth experience across different screen sizes. Additionally, rdx offers a Dark Mode for users who prefer a more comfortable and eye-friendly viewing experience, making it easy to enjoy Reddit in any lighting condition.

',$data);