Add Game Title in PS Store

As title for the new PS Store

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Add Game Title in PS Store
// @version      0.1
// @namespace    https://greasyfork.org/users/179168
// @description  As title for the new PS Store
// @match        https://store.playstation.com/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require      https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';
    waitForKeyElements('div.ems-sdk-product-tile-image__container span img', addGameTitle);

    function addGameTitle (jNode) {
        var alt = $(jNode).attr('alt');
        var grandpa = $(jNode).parent().parent().parent().parent();
        if ($(grandpa).find('section div.game-title').length == 0) {
            $(grandpa).find('section div.price__container').before('<div class="game-title">' + alt + '</div>');
        }
    }
})();

GM_addStyle( `
    .game-title {
        font-size: 14px;
        margin-top: .25rem;
        overflow: hidden;
        display: block;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
`);