Skip to content

Commit

Permalink
android app is here
Browse files Browse the repository at this point in the history
  • Loading branch information
avadhesh18 committed Jul 10, 2024
1 parent b7cee61 commit 2f9acb0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
29 changes: 23 additions & 6 deletions public/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ document.getElementById('body').innerHTML = fill;

};
req.onerror = function () {
document.getElementById('body').innerHTML = '<center style="padding:15px;">Can\'t load content!<br><b>I know about the error of home feed and user feed not working(individual subreddits are working). Reddit is making it hard to fix but I am trying. Meanwhile I have made an iOS App(free,ad-free, fast) to get around this and will launch it in 2-3 days. You can subscribe using your email below and I will send you an email when the app is ready.</b><iframe width="340" height="305" src="https://7a945f05.sibforms.com/serve/MUIFALUnKUyQYm475r-rbc10FSp870Ra3M3xoAR8XhhH5n1peSVzsoaHNqfh1r8UUqRbVjg_fljGuixCyVnGnCo3dQDsIrAat_5vYvjlI25DzLl6VEwr2SCM9GzniHmLjV7VpsHzaO0F26IGQPRIThB4OimW0sdaN9Eq8cTYV79Abo2j1HHLb-77KQkDzWtHHMdmSKbUXcOEd9Pa" frameborder="0" scrolling="auto" allowfullscreen style="display: block;margin-left: auto;margin-right: auto;max-width: 100%;"></iframe><small>There can be multiple reasons for this, your browser\'s aggresive privacy settings may be blocking the one call to reddit.com RDX makes. This happens usually when you use a VPM/Proxy and/or a privacy focused browser like Firefox.<br> Play around with privacy/tracking options or change your browser. If it still doesn\'t work click the feedback link and send me some info.</small></center>';
document.getElementById('body').innerHTML = '<center style="padding:15px;">Can\'t load content!<br><b>You can try the <a href="https://play.google.com/store/apps/details?id=com.overdevs.rdx">Android</a> and <a href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">iPhone</a> apps to get around it. If the error persists there too then it\'s a reddit problem and probably won\'t be fixed.</b><small>There can be multiple reasons for this, your browser\'s aggresive privacy settings may be blocking the one call to reddit.com RDX makes. This happens usually when you use a VPM/Proxy and/or a privacy focused browser like Firefox.<br> Play around with privacy/tracking options or change your browser. If it still doesn\'t work click the feedback link and send me some info.</small></center>';
};
req.send(null);
}
Expand Down Expand Up @@ -197,16 +197,12 @@ nexturl = '';
req.send(null);
}
function axit(){
localStorage.setItem('appshown1', 'yes');
localStorage.setItem('appshown2', 'yes');
document.getElementById('rdxapp').style.display = 'none';
}


function observe() {
if (localStorage.getItem('appshown1') !== 'yes') {

document.getElementById('body').insertAdjacentHTML("afterbegin",'<div id="rdxapp" >rdx iPhone app v1.2 is here <a class="dlbtnapp" href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">Install</a> <span class="axeit" onclick="axit();">X</span></div>');
}
const options = {
root: null,
threshold: 1.0
Expand Down Expand Up @@ -619,6 +615,27 @@ cret += '</div>';
return cret;
}
function runhsl(){
if (localStorage.getItem('appshown2') !== 'yes') {

var userAgent = navigator.userAgent || navigator.vendor;

if (/android/i.test(userAgent)) {
// User is on an Android device
document.getElementById('body').insertAdjacentHTML("afterbegin",
'<div id="rdxapp">rdx Android app is here <a class="dlbtnapp" href="https://play.google.com/store/apps/details?id=com.overdevs.rdx">Install</a> <span class="axeit" onclick="axit();">X</span></div>');
} else if (/iPad|iPhone|iPod/.test(userAgent)) {
// User is on an iOS device
document.getElementById('body').insertAdjacentHTML("afterbegin",
'<div id="rdxapp">rdx iPhone app v1.2 is here <a class="dlbtnapp" href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">Install</a> <span class="axeit" onclick="axit();">X</span></div>');
} else if (/Mac/.test(userAgent)) {
// User is on a macOS device
document.getElementById('body').insertAdjacentHTML("afterbegin",
'<div id="rdxapp">rdx iPhone app v1.2 is here <a class="dlbtnapp" href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">Install</a> <span class="axeit" onclick="axit();">X</span></div>');
}

}


const videos = document.querySelectorAll('.reddit_hls:not(.goner)');


Expand Down
7 changes: 5 additions & 2 deletions run.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta charset="utf-8">
<meta name="apple-itunes-app" content="app-id=6503479190">
<meta name="google-play-app" content="app-id=com.overdevs.rdx">
<link rel="stylesheet" href="styles.css" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.7.1/dash.all.min.js"></script>
</head>
Expand All @@ -29,7 +32,7 @@
<div class="list">
<a href="index.html" class="homelinks halfit">Home</a><a onClick="window.location.reload()" class="homelinks halfit">Refresh</a><a href="saved.html" class="homelinks halfit">Saved</a><a href="subreddit.html?r=popular" class="homelinks halfit">Popular</a>
<div id="subscribed">Subscribe to subreddits to view them here.</div> <div id="cthemew"><a href="themes.html" id="themebtn">Themes</a> <a href="settings.html">Settings</a> <a href="https://www.buymeacoffee.com/overdevsapps" rel="nofollow">Donate</a> <a href="new.html" rel="nofollow">New</a> <a href="contact.html" >Feedback</a> <br>
<small><span style="color:var(--lightc);">*</span> rdx iPhone App is here : <a href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">Download</a></small>
<small><span style="color:var(--lightc);">*</span> Download rdx APP: <a href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">iPhone</a> &bull; <a href="https://play.google.com/store/apps/details?id=com.overdevs.rdx">Android</a></small>
</div></div>
</div>
<div id="rightbar" class="hidden"></div>
Expand All @@ -47,7 +50,7 @@
$data = str_replace('<!--headhtml-->',$headhtml,$data);


$data = str_replace('</body>','<div class="footer"> <a rel="nofollow" href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190" class="appstorelogo"><img src="appstore.png" width="180" alt="donate"></a><br><a rel="nofollow" href="https://www.buymeacoffee.com/overdevsapps" class="bmac"><img src="bmac.png" width="150" alt="donate"></a><br>If you use rdx for Reddit&reg; please provide <a href="contact.html">Feedback</a> and <a href="https://www.buymeacoffee.com/overdevsapps" rel="nofollow">Donate</a>.<br><br><small><a href="new.html"> What\'s new?</a> | <a href="settings.html">Settings</a> | <a href="https://github.com/avadhesh18/rdx/">Star on Github</a> | <a href="https://apps.apple.com/us/app/miai-create-your-ai-friend/id6475200501">Try My AI Chat app </a></small></div> <div id="popitup" style="display:none;">
$data = str_replace('</body>','<div class="footer"> <a rel="nofollow" href="https://www.buymeacoffee.com/overdevsapps" class="bmac"><img src="bmac.png" width="150" alt="donate"></a><br>If you use rdx for Reddit&reg; please provide <a href="contact.html">Feedback</a> and <a href="https://www.buymeacoffee.com/overdevsapps" rel="nofollow">Donate</a>.<br>Download apps: <a href="https://apps.apple.com/us/app/rdx-for-reddit/id6503479190">iPhone</a> &bull; <a href="https://play.google.com/store/apps/details?id=com.overdevs.rdx">Android</a><br><small><a href="new.html"> What\'s new?</a> | <a href="settings.html">Settings</a> | <a href="https://github.com/avadhesh18/rdx/">Star on Github</a> </small></div> <div id="popitup" style="display:none;">
<span onclick="document.getElementById(\'popitup\').style.display=\'none\'">Cancel</span>
<div id="helptext"></div><textarea class="cmntarea" id="commentText" placeholder="Write a reply!" required></textarea>
<input id="cmtid" value="" type="hidden"/> <input id="actype" value="" type="hidden"/> <button id="cmntbtn" onclick="apiAction();">Submit</button>
Expand Down

0 comments on commit 2f9acb0

Please sign in to comment.