Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is how you would find the least expensive price on any product page on the website you mentioned that has a Private Sales list when on the right page (such as <a href="http://www.roblox.com/Red-RAWR-item?id=66330295" rel="nofollow">http://www.roblox.com/Red-RAWR-item?id=66330295</a>):</p> <pre><code>if (window.location.href.match(/http:\/\/www.roblox.com\/.*?\?id=\d+/) &amp;&amp; document.getElementById('UserSalesLink')) { var priceElement = document.getElementById('UserSalesTab').getElementsByTagName('tr')[1].getElementsByTagName('td')[2].getElementsByTagName('b')[0]; // Get the element that contains the price var price = parseInt(priceElement.innerHTML.match(/\d+/)); // Store the price as an int } </code></pre> <p>Using that code, you will end up with a variable <code>price</code> which is an int containing the least expensive price on the page.</p> <p>I use javascript's <a href="https://developer.mozilla.org/en/DOM/document.getElementById" rel="nofollow">getElementById()</a> method and the <a href="https://developer.mozilla.org/en/DOM/document.getElementsByTagName" rel="nofollow">getElementsByTagName()</a> method to narrow it down to the right div, then I use the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/match" rel="nofollow">match()</a> method to extract the numbers from that element, and the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt" rel="nofollow">parseInt()</a> method to store the price as an integer instead of a string.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload