ovigilante / xbox 360 marketplace price position fixer

// ==UserScript==
// @name         xbox 360 marketplace price position fixer
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  fix CSS position of price in list of search results and detail page of a game in web site
// @author       ovigilante
// @match        https://marketplace.xbox.com/*/Search?*
// @match        https://marketplace.xbox.com/*/Product/*
// @license      MIT
// @grant        none
// @run-at       document-start
// ==/UserScript==

/*
Notes:
due to a bug in the xbox 360 marketplace, the price of the games are position in the bottom of all list (search result and detail page of a game)
this is a script to allow google chrome to correct position of price without any manual requirements for the user
*/

console.log("xbox 360 marketplace price position fixer has been loaded");
var searchPidl = true;
if(searchPidl === true)
{
    var checkPrerequisites = window.setInterval(function()
    {
        var preReqElement = (document.querySelectorAll(".SearchTiles .PriceArea") || document.querySelectorAll(".RelatedTiles .PriceArea"));
        if(preReqElement != null)
        {
            console.log("the script has been loaded. fixing price position...");
            var searchTiles = document.querySelectorAll(".SearchTiles .PriceArea");
            for (let i = 0; i < searchTiles.length; i++)
            {
                searchTiles[i].style.position = "static";
            }

            var relatedTiles = document.querySelectorAll(".RelatedTiles .PriceArea");
            for (let i = 0; i < relatedTiles.length; i++)
            {
                relatedTiles[i].style.position = "static";
            }

            console.log("price position fixed");
            clearInterval(checkPrerequisites);
            //debugger;
        }
    }, 1000);
}