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.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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
    );
})();