Added Old Reddit #61

This commit is contained in:
ManeraKai 2022-02-26 01:45:22 +03:00
parent 41e145bf7a
commit a5415d34bc
4 changed files with 8 additions and 0 deletions

View File

@ -201,6 +201,8 @@ function redirect(url, type) {
if (type !== "main_frame" || url.pathname.match(bypassPaths)) return null; if (type !== "main_frame" || url.pathname.match(bypassPaths)) return null;
if (frontend == 'old') return `${redirects.desktop}${url.pathname}${url.search}`;
let libredditInstancesList; let libredditInstancesList;
let tedditInstancesList; let tedditInstancesList;
if (protocol == 'normal') { if (protocol == 'normal') {

View File

@ -56,6 +56,7 @@ print('fetched Nitter')
# Bibliogram # Bibliogram
r = requests.get('https://bibliogram.art/api/instances') r = requests.get('https://bibliogram.art/api/instances')
print(r.text)
rJson = json.loads(r.text) rJson = json.loads(r.text)
bibliogramList = {} bibliogramList = {}
bibliogramList['normal'] = [] bibliogramList['normal'] = []

View File

@ -124,6 +124,7 @@
<select id="reddit-frontend"> <select id="reddit-frontend">
<option value="libreddit">Libreddit</option> <option value="libreddit">Libreddit</option>
<option value="teddit">Teddit</option> <option value="teddit">Teddit</option>
<option value="old">Old Reddit</option>
</select> </select>
</div> </div>

View File

@ -18,6 +18,10 @@ function changeFrontendsSettings(frontend) {
libredditDivElement.style.display = 'none'; libredditDivElement.style.display = 'none';
tedditDivElement.style.display = 'block'; tedditDivElement.style.display = 'block';
} }
else if (frontend == 'old') {
libredditDivElement.style.display = 'none';
tedditDivElement.style.display = 'none';
}
} }
let redditFrontendElement = document.getElementById("reddit-frontend"); let redditFrontendElement = document.getElementById("reddit-frontend");
redditFrontendElement.addEventListener("change", redditFrontendElement.addEventListener("change",