GOG additional buttons and downloads v2

Add GOG DB and GOG Games links to the GOG store

Pada tanggal 04 Juli 2023. Lihat %(latest_version_link).

// ==UserScript==
// @name         GOG additional buttons and downloads v2
// @homepageURL https://gog-games.com/
// @description Add GOG DB and GOG Games links to the GOG store
// @version 1.0.1
// @author Wizzergod
// @license MIT
// @namespace GOG additional buttons and downloads
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.gog.com
// @run-at document-end
// @match https://www.gog.com/*/game/*
// @match https://www.gog.com/game/*
// @match https://web.archive.org/web/*
// @grant unsafeWindow
// @grant        none
// ==/UserScript==


(function() {
  var productcardData = unsafeWindow.productcardData;
  var product_id = productcardData.cardProductId;
  var product_slug = productcardData.cardProductSlug;
  var product_title = productcardData.cardProduct.title;

    'use strict';

    // Создаем новый блок Free Games Downloads
    var newBlock = document.createElement('div');
    newBlock.innerHTML = `


        <div class="title title--no-margin">
            <div class="title__underline-text">
                Free Games Downloads
            </div>
            <div class="title__additional-options"></div>
        </div>


  <div class="why-gog__item" style="background-color: #33333312; margin: 0; box-sizing: border-box;">
  <i>These links lead to the search feature on specified websites, and remember piracy is bad if you downloaded, played and liked the game, then buy it, so you will thank the developers!</i>
  </div>


  <div class="table__row details__rating details__row details__row--first" style="background-color: #1ee83a12;">
  <div class="details__category table__row-label">Torrent: Gog</div><div class="details__content table__row-content">
  <a href="https://gog-games.to/search/${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>Gog-games.to<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1ee83a12;">
  <div class="details__category table__row-label">Torrent: Gog</div><div class="details__content table__row-content">
  <a href="https://gogunlocked.com/?s=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>GoGUnlocked.com<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1ee83a12;">
  <div class="details__category table__row-label">Torrent: Gog</div><div class="details__content table__row-content">
  <a href="https://freegogpcgames.com/?s=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>FreeGogPcGames.com<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>


  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://www.torrentdownloads.pro/search/?search=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>torrentdownloads.pro<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://www.torrentdownload.info/search?q=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>torrentdownload.info<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://s1.thelastgame.club/?do=search&subaction=search&story=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>thelastgame.club<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://www.limetorrents.lol/search/games/${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>limetorrents.lol<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://thepiratebay.org/search.php?cat=401&q=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>thepiratebay.org<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://thelastgame.org/?do=search&subaction=search&story=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>thelastgame.org<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://thelastgame.ru/?s=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>thelastgame.ru<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://catorrent.org/index.php?do=search&story=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>catorrent.org<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://rutracker.org/forum/tracker.php?nm=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>rutracker.org<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://igrovaya.org/?do=search&story=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>igrovaya.org<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://nnmclub.to/forum/tracker.php?nm=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>nnmclub.to<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #1e7ee812;">
  <div class="details__category table__row-label">Torrent</div><div class="details__content table__row-content">
  <a href="https://1337x.to/search//1/?search=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>1337x.to<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>


  <div class="table__row details__rating details__row details__row--first" style="background-color: #d3e81e12;">
  <div class="details__category table__row-label">View on forum</div><div class="details__content table__row-content">
  <a href="https://cs.rin.ru/forum//search.php?st=0&sk=t&sd=d&sr=topics&terms=any&sf=titleonly&keywords=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>cs.rin<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #d3e81e12;">
  <div class="details__category table__row-label">View on forum</div><div class="details__content table__row-content">
  <a href="https://f95zone.to/search/search?keywords=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>f95zone<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>


  <div class="table__row details__rating details__row details__row--first" style="background-color: #e8591e12;">
  <div class="details__category table__row-label">View on</div><div class="details__content table__row-content">
  <a href="https://www.gogdb.org/products?search=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>GOGDB<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

  <div class="table__row details__rating details__row details__row--first" style="background-color: #e8591e12;">
  <div class="details__category table__row-label">View on</div><div class="details__content table__row-content">
  <a href="https://steamdb.info/search/?a=app&q=${encodeURIComponent(product_title)}" class="details__feature ng-scope">
  <svg class="details__feature-icon details__feature-icon--download" style="width: 16px;"><use xlink:href="#download">
  </use></svg>SteamDB<svg class="details__feature-chevron-icon"><use xlink:href="#chevron-right"></use></svg></a></div></div>

    `;

    var productDetailsBlock = document.querySelector('.content-summary-section[content-summary-section-id="productDetails"]');
    if (productDetailsBlock) {

        productDetailsBlock.insertBefore(newBlock, productDetailsBlock.firstChild);
    }
})();