Mafrans/StadiaPlus

IK the don't want to change the images but...

Closed this issue · 3 comments

run this in console (its the best I could get it with automation) and I am not saying don't have your thing this could be a mode type thing.

let libraryfiltergame = document.querySelectorAll(".stadiaplus_libraryfilter-game");
if(libraryfiltergame.length != 0) {
for (var i = 0; i < libraryfiltergame.length; i++) {
var style = libraryfiltergame[i].getAttribute("style");
style = style.replace('"https://stadiagamedb.com/images/posters/webp/', "https://stadiasource.com/images/box_art/jpg/");
style = style.replaceAll("_", "-");
style = style.replace('.webp"', '.jpg');
style = style.replace('https://stadiasource.com/images/box-art/jpg/', "https://stadiasource.com/images/box_art/jpg/");
libraryfiltergame[i].setAttribute("style", style + "background-size: auto 400px;width: 300px;height: 400px");
}
}

var styles = ".stadiaplus_libraryfilter .stadiaplus_libraryfilter-gamecontainer .stadiaplus_libraryfilter-game .content {display:none;}"

var styleSheet = document.createElement("style")
styleSheet.type = "text/css"
styleSheet.innerText = styles
document.head.appendChild(styleSheet)

This issue should be addressed by the pull request #155 which points to images more appropriate to the current Stadia+ layout.

A solution to scrape relevant images to use the Stadia links directly is also proposed here, though it may require specific implementation (to only scrape images when the site is in english and to then store them somewhere for use outside of the "all games" page).

This has been addressed as of #155

my updated code for this is at https://pastebin.com/Dfmg91FD