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.
544 Comments - Last post 58 minutes ago by hbarkas
46 Comments - Last post 2 hours ago by VahidSlayerOfAll
8 Comments - Last post 6 hours ago by katukinabarra
298 Comments - Last post 6 hours ago by SebasR
6 Comments - Last post 7 hours ago by PatchmaN
31 Comments - Last post 8 hours ago by WaxWorm
1,489 Comments - Last post 8 hours ago by Tyln
32 Comments - Last post 3 minutes ago by amusedmonkey
7 Comments - Last post 12 minutes ago by Taizun
40 Comments - Last post 26 minutes ago by cami666
21 Comments - Last post 38 minutes ago by CheMan39
90 Comments - Last post 47 minutes ago by hsunkuei
2,419 Comments - Last post 47 minutes ago by ObsidianSpire
228 Comments - Last post 51 minutes ago by womackcn
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.