Skip to content

Commit

Permalink
Added Old Reddit #61
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Feb 25, 2022
1 parent 41e145b commit a5415d3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/assets/javascripts/helpers/reddit.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ function redirect(url, type) {

if (type !== "main_frame" || url.pathname.match(bypassPaths)) return null;

if (frontend == 'old') return `${redirects.desktop}${url.pathname}${url.search}`;

let libredditInstancesList;
let tedditInstancesList;
if (protocol == 'normal') {
Expand Down
1 change: 1 addition & 0 deletions src/instances/get_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def get_host_name(link):

# Bibliogram
r = requests.get('https://bibliogram.art/api/instances')
print(r.text)
rJson = json.loads(r.text)
bibliogramList = {}
bibliogramList['normal'] = []
Expand Down
1 change: 1 addition & 0 deletions src/pages/options/reddit/reddit.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ <h4>Frontend</h4>
<select id="reddit-frontend">
<option value="libreddit">Libreddit</option>
<option value="teddit">Teddit</option>
<option value="old">Old Reddit</option>
</select>
</div>

Expand Down
4 changes: 4 additions & 0 deletions src/pages/options/reddit/reddit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function changeFrontendsSettings(frontend) {
libredditDivElement.style.display = 'none';
tedditDivElement.style.display = 'block';
}
else if (frontend == 'old') {
libredditDivElement.style.display = 'none';
tedditDivElement.style.display = 'none';
}
}
let redditFrontendElement = document.getElementById("reddit-frontend");
redditFrontendElement.addEventListener("change",
Expand Down

0 comments on commit a5415d3

Please sign in to comment.