Hide GOG heroes

Hide hero images from the redesigned GOG game pages. Puts the price box back in the old place. This changes should make the desktop browsing experience more pleasant.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Hide GOG heroes
// @description  Hide hero images from the redesigned GOG game pages. Puts the price box back in the old place. This changes should make the desktop browsing experience more pleasant.
// @namespace    https://github.com/BattleMage
// @homepageURL  https://github.com/BattleMage/gog-anti-hero
// @version      0.3
// @author       BattleMage
// @match        https://www.gog.com/game/*
// @match        https://www.gog.com/*/game/*
// @grant        GM_addStyle
// @require      https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle('.productcard-player {display:none;}');
    GM_addStyle('.product-actions {position: relative; width: auto; right: auto;}');
    GM_addStyle('@media (min-width: 737px) { .productcard-basics {padding-top: 65px;} }');

    let productPrice = document.querySelector('div.product-actions.hide-when-content-is-expanded[product-actions]');
    let sideColumn = document.getElementsByClassName('layout-side-col')[0];
    let whyGog = sideColumn.getElementsByClassName('why-gog')[0];
    let summarySection = document.getElementsByClassName('layout-side-col')[0].getElementsByClassName('content-summary-section')[0];
    sideColumn.insertBefore(
        productPrice,
        whyGog
    );
})();