Skip to content

Commit

Permalink
title issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
avadhesh18 committed Sep 2, 2024
1 parent d965354 commit b172bd5
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 51 deletions.
20 changes: 18 additions & 2 deletions public/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,23 @@ async function makereq(url) {
let fill = '';
let titlesx = url.replace("https://www.reddit.com/r/", "");
titlesx = titlesx.replace("/.json", "");
document.title = titlesx;
// var titlesx = url.match(/\/r\/([^\/]+)/)[1];
const titlesxz = url.match(/\/(r|u|user)\/([^\/]+)/);
if (titlesxz) {
if(window.location.href == "https://rdx.overdevs.com/") {

}
else {
document.title = titlesxz[2] +" • "+titlesxz[1]+"/"+titlesxz[2] ;
}
const metadesc = "Browse "+titlesxz[1]+"/"+titlesxz[2] +" images, videos, GIFs and text posts on rdx for reddit a fast, lightweight mobile Web Viewer for Reddit by overdevs.";
let metaDescription = document.querySelector('meta[name="description"]');
if (metaDescription) {
metaDescription.setAttribute("content", metadesc);
}
}

// document.title = titlesx;

let posts = jsonResponse['data']['children'];
for (let item of posts) {
Expand Down Expand Up @@ -354,7 +370,7 @@ returnfpost += postbuilder(post['crosspost_parent_list'][0]);
}
else {
if(over18 === 'over18') {returnfpost += '<button onclick="allown_sfw()" class="sfwtoggle">Click to Allow this content</button>';}
if(typeof urli != "undefined" && post['removed_by_category'] == null){ returnfpost += '<div class="urlpreview '+over18+'">'+urlpreview(urli,post)+'</div><div style="text-align: right;font-size:12px;"><a href="'+post['url']+'"><small>Open URL</small></a></div>'; }
if(typeof urli != "undefined" && post['removed_by_category'] == null){ returnfpost += '<div class="urlpreview '+over18+'">'+urlpreview(urli,post)+'</div><div style="text-align: right;font-size:12px;"><a href="'+post['url']+'" target="_blank"><small>Open URL</small></a></div>'; }
if(post['removed_by_category'] != null) {
returnfpost += 'Removed by '+ post['removed_by_category'];
}
Expand Down
96 changes: 48 additions & 48 deletions public/subreddit.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
<!DOCTYPE html><html><head>
<title>RDX for Reddit - Apollo For Reddit Inspired Web Viewer</title>
<meta name="description" content="rdx for reddit is a fast, lightweight mobile Web Viewer for Reddit based on Apollo. Mobile friendly reader for Reddit. Browse Reddit without Ads."/>
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.png">
<link rel="manifest" href="/manifest.json" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="rdx" />
<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>
<body>
<header id="header">
<div id="pagetitle">
<span id="plus" onclick="toggle('leftbar')"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#fff" role="img" aria-label="Menu"><path d="M140.001-254.616v-59.999h679.998v59.999H140.001Zm0-195.385v-59.998h679.998v59.998H140.001Zm0-195.384v-59.999h679.998v59.999H140.001Z"></path></svg></span>
<span id="taptoopenmenu" onclick="toggle('subssearch')"><span id="pagetitletext">Loading...</span>
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" id="icon-target" style=""><path fill="currentColor" d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"></path></svg></span>
<span id="menu" onclick="toggle('rightbar')"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#fff" role="img" aria-label="Sort and other options"><path d="M411.155-260.001V-320h137.306v59.999H411.155Zm-155-190v-59.998H703.46v59.998H256.155ZM140.001-640v-59.999h679.998V-640H140.001Z"/></svg></span>
</div>
<div id="menus">
<div id="subssearch" class="hidden">
<input type="text" id="subssearchi" name="qury" onkeyup="searchsubs(this.value,event)" autocomplete="off">
<div id="subslist"></div>
</div>
<div id="leftbar" class="hidden">
<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> 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>
</div>
</header>
<div id="body">
</div>
<script src="functions.js"></script><!-- Web Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token": "5ce6e4ad5599462c8e3c36f2223a7184"}'></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script>
<!DOCTYPE html><html><head>
<title>RDX for Reddit - Apollo For Reddit Inspired Web Viewer</title>
<meta name="description" content="rdx for reddit is a fast, lightweight mobile Web Viewer for Reddit based on Apollo. Mobile friendly reader for Reddit. Browse Reddit without Ads."/>
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.png">
<link rel="manifest" href="/manifest.json" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="rdx" />
<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>
<body>
<header id="header">
<div id="pagetitle">
<span id="plus" onclick="toggle('leftbar')"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#fff" role="img" aria-label="Menu"><path d="M140.001-254.616v-59.999h679.998v59.999H140.001Zm0-195.385v-59.998h679.998v59.998H140.001Zm0-195.384v-59.999h679.998v59.999H140.001Z"></path></svg></span>
<span id="taptoopenmenu" onclick="toggle('subssearch')"><span id="pagetitletext">Loading...</span>
<svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" id="icon-target" style=""><path fill="currentColor" d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"></path></svg></span>
<span id="menu" onclick="toggle('rightbar')"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#fff" role="img" aria-label="Sort and other options"><path d="M411.155-260.001V-320h137.306v59.999H411.155Zm-155-190v-59.998H703.46v59.998H256.155ZM140.001-640v-59.999h679.998V-640H140.001Z"/></svg></span>
</div>
<div id="menus">
<div id="subssearch" class="hidden">
<input type="text" id="subssearchi" name="qury" onkeyup="searchsubs(this.value,event)" autocomplete="off">
<div id="subslist"></div>
</div>
<div id="leftbar" class="hidden">
<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> 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>
</div>
</header>
<div id="body">
</div>
<script src="functions.js"></script><!-- Web Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token": "5ce6e4ad5599462c8e3c36f2223a7184"}'></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script>
<script>iosPWASplash('5122.png', '#4e2a72');</script>
<script>

Expand Down Expand Up @@ -68,7 +68,7 @@

substoload = getget('r');
document.getElementById('pagetitletext').innerHTML = getget('r');

//document.title = getget('r');

url='https://old.reddit.com/r/'+substoload+'/';
if(getget('sort') != null){
Expand Down Expand Up @@ -99,8 +99,8 @@
doit();
</script>
</style>
<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>
<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>
</div> <!-- rdx --></body></html>
2 changes: 1 addition & 1 deletion run.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$data = str_replace('<!-- rdx -->','<div class="infotext">
<h1>Explore RDX for Reddit: A Fast and Light weight Web Viewer Inspired by Apollo</h1>
<p>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.</p>
<h2>Enjoy Reddit Anywhere: rdx\'s Mobile Friendly Design and Dark Mode</h2>
<h2>Enjoy Reddit Anywhere: rdx\'s Mobile Friendly Design and Multiple Dark and Light Themes</h2>
<p>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.</p>
</div> ',$data);
}
Expand Down

0 comments on commit b172bd5

Please sign in to comment.