Skip to content

Commit cca7df0

Browse files
author
ComputerElite
committed
fix downgrading
1 parent 9a12d4c commit cca7df0

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

Assets/html/downgrade.html

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
</div>
140140
This is not your fault. This shown up when my proxy server (which makes you able to do requests to Oculus) is shut down. Currently it has reached the maximum runtime for this month. While this happens all cached data will be used so you can continue to use this site.
141141
</div>`
142-
var access_token = "OC|752908224809889|"
142+
var access_token = "OC|1317831034909742|"
143143

144144
var url = new URL(window.location.href);
145145
var id = url.searchParams.get("id");
@@ -218,7 +218,7 @@
218218
document.getElementById("resultContainer").innerHTML = storeSkeleton
219219
document.getElementById("apps").innerHTML = loader
220220
var searchTerm = document.getElementById("searchTerm").value
221-
PostRequest(requestUrl, `access_token=${access_token}&variables={"query":"${searchTerm}","hmdType":"MONTEREY","firstSearchResultItems":100}&doc_id=4446310405385365`).then((res) => {
221+
PostRequest(requestUrl, `access_token=${access_token}&variables={"query":"${searchTerm}","hmdType":"MONETERY","firstSearchResultItems":100}&doc_id=3928907833885295`).then((res) => {
222222
/*
223223
document.getElementById("apps").innerHTML = ""
224224
res.data.application_search.results.edges.forEach(element => {
@@ -244,11 +244,21 @@
244244
})
245245
}
246246
})
247-
if(document.getElementById("apps").innerHTML == "") {
248-
document.getElementById("apps").innerHTML = "<div style='font-size: 24px; text-align: center; flex: 1;'>Nothing found</div>"
249-
}
247+
MakeJSONGetRequestAsync("https://computerelite.github.io/tools/Oculus/OlderAppVersions/index.json").then(res => {
248+
res.forEach(element => {
249+
if(element.headset != "MONTEREY" || !element.name.toLowerCase().includes(searchTerm.toLowerCase())) return
250+
document.getElementById("apps").innerHTML += GetResultFormatted({
251+
imgsrc: element.img,
252+
name: element.name,
253+
id: element.id
254+
})
255+
})
256+
if(document.getElementById("apps").innerHTML == "") {
257+
document.getElementById("apps").innerHTML = "<div style='font-size: 24px; text-align: center; flex: 1;'>Nothing found</div>"
258+
}
259+
})
250260
}).catch(err => {
251-
MakeJSONGetRequestAsync("OlderAppVersions/index.json").then(res => {
261+
MakeJSONGetRequestAsync("https://computerelite.github.io/tools/Oculus/OlderAppVersions/index.json").then(res => {
252262
document.getElementById("appsinfo").innerHTML = `<div>Request to Oculus failed. <i>(Basic)</i> Search has run on cached apps</div>` + RequestFailedError
253263
document.getElementById("apps").innerHTML = ""
254264
res.forEach(element => {
@@ -487,7 +497,7 @@
487497
function GetResultFormatted(element) {
488498
return `<a class="darken" style="flex: 0; background-color: #22222200; font-size: 18px; padding: 5px; margin: 5px; cursor: pointer; text-align: left;" onclick="SearchVersions('${element.id}')" oncontextmenu="return SetupContextMenu(event, '${element.id}', false);">
489499
<table style="width: fit-content; margin: auto;" class="defTextColor">
490-
<tr><td><img src="${element.imgsrc}" style="max-height: 250px; max-width: 600px;" onerror="if (this.src != '../../assets/ImageNotAvailable.png') this.src = '../../assets/ImageNotAvailable.png'"></td></tr><tr><td>${element.name}</td></tr>
500+
<tr><td><img src="${element.imgsrc}" style="max-height: 250px; max-width: 600px;" onerror="if (this.src != 'https://computerelite.github.io/assets/ImageNotAvailable.png') this.src = 'https://computerelite.github.io/assets/ImageNotAvailable.png'"></td></tr><tr><td>${element.name}</td></tr>
491501
</table>
492502
</a>`
493503
}

0 commit comments

Comments
 (0)