ProtonDB don't have any public API, and parsing html pages is too much bother (and not nice towards protondb maintainers on top of it). So, while it would be nice, there is no technical possibility to do that.
Comment has been collapsed.
But it can be achieved from their reporting dumps for example.
https://github.com/maxpoulin64/protondb-api/blob/master/README.md
Comment has been collapsed.
Then what is the plug in on my deck using? Its just adds a little symbol to the games and if I click it, I go to the proton dB page for that game.
Comment has been collapsed.
I saw a userscript somewhere for this.
I don't think this should be implemented, since I think it's a really small subset of users who own the device and it would make unnecessary strain on the server and it would add unnecessary maintenance. This can be done from the browser with a userscript if there isn't one already.
Linux users are under 2% and 40% of that is steam deck if I'm not mistaken. Probably the same percentage here.
Comment has been collapsed.
Here is a userscript to add a link with the protondb rating to the giveaway page.
(Edit: "native" does not work, but ESGST can show if it is native to linux)
// ==UserScript==
// @name SG Proton
// @namespace http://tampermonkey.net/
// @version 2024-01-23
// @description try to take over the world!
// @author You
// @match https://www.steamgifts.com/giveaway/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=steamgifts.com
// @grant GM_xmlhttpRequest
// @connect protondb.com
// ==/UserScript==
(function() {
'use strict';
const steam = document.body.querySelector('a.global__image-outer-wrap--game-large');
if ( steam.href.startsWith('https://store.steampowered.com/app/') )
{
const appId = steam.href.slice(35,-1);
const proton = "https://www.protondb.com/api/v1/reports/summaries/" + appId + ".json"
GM.xmlHttpRequest({
method: "GET",
url: "https://www.protondb.com/api/v1/reports/summaries/" + appId + ".json",
onload: function(response) {
let summary = JSON.parse (response.responseText);
let container = document.body.querySelector('div.featured__heading');
let el = document.createElement('a');
el.href = 'https://www.protondb.com/app/' + appId;
el.target = '_blank';
el.innerHTML = ' ' + summary.tier + ' ';
switch ( summary.tier )
{
case 'native':
el.style.backgroundColor = 'rgb(0, 128, 0)';
break;
case 'platinum':
el.style.backgroundColor = 'rgb(180, 199, 220)';
break;
case 'gold':
el.style.backgroundColor = 'rgb(207, 181, 59)';
break;
case 'silver':
el.style.backgroundColor = 'rgb(166, 166, 166)';
break;
case 'bronze':
el.style.backgroundColor = 'rgb(205, 127, 50)';
break;
case 'borked':
el.style.backgroundColor = 'rgb(255, 0, 0)';
break;
};
el.style.color = 'black';
el.style.borderRadius = '4px';
container.appendChild(el);
}
});
}
})();
Comment has been collapsed.
Yes, I got it from the ProtonDB for Steam browser extention
Comment has been collapsed.
Another userscript, based on this one, it uses shields.io dynamic badge instead of making an AJAX call ourselves:
// ==UserScript==
// @name SteamGifts - ProtonDB Status
// @namespace https://www.steamgifts.com/user/ormax3
// @author ormax3
// @match https://www.steamgifts.com/giveaway/*
// @icon https://cdn.steamgifts.com/img/favicon.ico
// ==/UserScript==
function createProtonBadge(appid) {
let img = document.createElement('img');
img.src = `https://img.shields.io/badge/dynamic/json?url=https://www.protondb.com/api/v1/reports/summaries/${appid}.json&query=$.trendingTier&label=ProtonDB&logo=protondb&color=e3e3e3`;
let a = document.createElement('a');
a.rel = 'nofollow noopener';
a.target = '_blank';
a.href = `https://www.protondb.com/app/${appid}`;
a.title = 'ProtonDB';
a.append(img);
return a;
}
let container = document.querySelector('.featured__heading');
if (!container) return;
let appid = container.querySelector('a[href^="https://store.steampowered.com/app/"]')?.href.match(/\d+/)[0];
if (!appid) return;
container.after(createProtonBadge(appid));
Comment has been collapsed.
Userscript with caching: https://www.steamgifts.com/discussion/N41nU/userscript-protondb-game-tier-for-steamgifts
Comment has been collapsed.
1,163 Comments - Last post 11 minutes ago by magicmase
21 Comments - Last post 32 minutes ago by OneManArmyStar
208 Comments - Last post 34 minutes ago by robertodeArtois
43 Comments - Last post 56 minutes ago by sensualshakti
15,422 Comments - Last post 1 hour ago by Ellendyl
1,353 Comments - Last post 2 hours ago by LuckyStrike1305
19 Comments - Last post 3 hours ago by Chris76de
34 Comments - Last post 3 minutes ago by kudomonster
6 Comments - Last post 5 minutes ago by Navaro
26,520 Comments - Last post 8 minutes ago by kodonokami
696 Comments - Last post 9 minutes ago by Ministrix
709 Comments - Last post 12 minutes ago by Arwiee
169 Comments - Last post 16 minutes ago by Moogal
104 Comments - Last post 22 minutes ago by PanTsour
Title pretty much says it all, but I will elaborate.
With the rising popularity of the steam deck it would be really nice and cool if you could add on the giveaway page a proton DB rating for the games.
This would make finding games not verified but rated as gold and platinum on Linux easier. I have a plug in on my deck that shows a little symbol on each game in my library. Surely something similar could be achieved here.
https://www.protondb.com/
Comment has been collapsed.