Posted October 20, 2018
high rated
show game names on game tiles
This is a temporary userscript inspired by code snippets of BKGaming
for the transition time until the GOG page hopefully looks better, or like Bkgaming already said, adaliabooks and Barefoot_Monkey come up with updated scripts.
It displays game names on the game tiles without need to hovering over tile.
new version!
improved performance (on front page no more greasmonkey waiting message)
improved visible font (bold, italic, left-aligned)
longer texts displayed completely
removed double entries on frontpage (thanks BkGaming!)
Screenshots
old version
screen1
screen2
screen3
new version
screen1
Installation
I made this script on firefox with greasmonkey.
Simplest way to install on firefox:
1) You must have Greasemonkey installed.
2) DOWNLOAD script. (free filehost without registration)
3) in Greasmonkey "import" and select the downloaded zip
4) ready
For other browsers there should be similar addons like Tampermonkey and this script maybe works, but no guarantee.
have fun
code
// ==UserScript==
// @name GOG show game names on gametiles
// @include https://www.gog.com/
// @include https://www.gog.com/game*
// @require https://code.jquery.com/jquery-3.3.1.slim.min.js
// @version 2.1
// @grant none
// ==/UserScript==
// Tested on Firefox 62.0.3(64bit) + Greasemonkey
var busy = false;
if(window.location.href == 'https://www.gog.com/'){
if (!busy){
busy = true;
fillText();
busy = false;
}
}
$("div.catalog__body").on('DOMSubtreeModified', function () {
if (!busy){
busy = true;
fillText();
busy = false;
}
});
$(document).ready(function() {
console.log("ready xxx");
$("div.content.cf div.container.container--two-columns div.container--two-columns__child--discover-games div.tabbed-section.ng-scope div.discover-games__products div div.product-tile.product-tile--list.ng-scope a.product-tile__content.js-content div.product-tile__info .scriptGameTitle").remove();
});
function fillText(){
var games = [""];
// read all game titles
$("div.product-tile__title").each(function( index ) {
games[index] = $(this).text();
});
// enter all titles in info fields
$("div.product-tile__info").each(function( index ) {
// prevent double entries
if ( ($(this).text().indexOf(games[index])) < (0) ){
$( this ).css("margin-left", "0" );
$( this ).css("padding-left", "3px" );
$( this ).css("height", "auto" );
$(this).prepend("<span class=\"scriptGameTitle\" style=\"background-color:#f7f7f7;font-size:0.75;font-style:italic;font-weight:bold\">" + games[index] + "</span>");
}
});
}
This is a temporary userscript inspired by code snippets of BKGaming
for the transition time until the GOG page hopefully looks better, or like Bkgaming already said, adaliabooks and Barefoot_Monkey come up with updated scripts.
It displays game names on the game tiles without need to hovering over tile.
new version!
improved performance (on front page no more greasmonkey waiting message)
improved visible font (bold, italic, left-aligned)
longer texts displayed completely
removed double entries on frontpage (thanks BkGaming!)
Screenshots
old version
screen1
screen2
screen3
new version
screen1
Installation
I made this script on firefox with greasmonkey.
Simplest way to install on firefox:
1) You must have Greasemonkey installed.
2) DOWNLOAD script. (free filehost without registration)
3) in Greasmonkey "import" and select the downloaded zip
4) ready
For other browsers there should be similar addons like Tampermonkey and this script maybe works, but no guarantee.
have fun
code
// ==UserScript==
// @name GOG show game names on gametiles
// @include https://www.gog.com/
// @include https://www.gog.com/game*
// @require https://code.jquery.com/jquery-3.3.1.slim.min.js
// @version 2.1
// @grant none
// ==/UserScript==
// Tested on Firefox 62.0.3(64bit) + Greasemonkey
var busy = false;
if(window.location.href == 'https://www.gog.com/'){
if (!busy){
busy = true;
fillText();
busy = false;
}
}
$("div.catalog__body").on('DOMSubtreeModified', function () {
if (!busy){
busy = true;
fillText();
busy = false;
}
});
$(document).ready(function() {
console.log("ready xxx");
$("div.content.cf div.container.container--two-columns div.container--two-columns__child--discover-games div.tabbed-section.ng-scope div.discover-games__products div div.product-tile.product-tile--list.ng-scope a.product-tile__content.js-content div.product-tile__info .scriptGameTitle").remove();
});
function fillText(){
var games = [""];
// read all game titles
$("div.product-tile__title").each(function( index ) {
games[index] = $(this).text();
});
// enter all titles in info fields
$("div.product-tile__info").each(function( index ) {
// prevent double entries
if ( ($(this).text().indexOf(games[index])) < (0) ){
$( this ).css("margin-left", "0" );
$( this ).css("padding-left", "3px" );
$( this ).css("height", "auto" );
$(this).prepend("<span class=\"scriptGameTitle\" style=\"background-color:#f7f7f7;font-size:0.75;font-style:italic;font-weight:bold\">" + games[index] + "</span>");
}
});
}
Post edited October 22, 2018 by surfersurfer