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.
28 Comments - Last post 8 minutes ago by DiabLXIX
777 Comments - Last post 26 minutes ago by Bin246
27 Comments - Last post 7 hours ago by TinTG
32 Comments - Last post 10 hours ago by Chris76de
173 Comments - Last post 10 hours ago by rasLivity
15,552 Comments - Last post 10 hours ago by OurMajesty
40 Comments - Last post 14 hours ago by FranckCastle
6 Comments - Last post 7 minutes ago by Waxlor
71 Comments - Last post 9 minutes ago by Exodust
48 Comments - Last post 23 minutes ago by Waxlor
5,802 Comments - Last post 30 minutes ago by 76561198082881386
1,236 Comments - Last post 34 minutes ago by Pyrocious
61 Comments - Last post 52 minutes ago by ThatDave
47 Comments - Last post 1 hour ago by Sno1
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.