itsastickup / Rank at top for amazon

// ==UserScript==
// @name         Rank at top for amazon
// @namespace    http://itsastickup.com
// @version      0.3
// @description  Copy the product rank to the top
// @author       itsastickup
// @license MIT
// @copyright 2020, Mr Public Domain
// @match        https://www.amazon.com/*
// @match        https://amazon.com/*
// @match         https://amazon.co.uk/*
// @match         https://www.amazon.co.uk/*
// @grant GM_log
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js#sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=
// ==/UserScript==

(function () {
  'use strict';

  function debug(s, label) {
    label = label || '';
    if (label) {
      label = label + ': ';
    }
    console.debug('Rank at top - ' + label + s);
    return s;
  }

  function debugb(s, label) {

    label = label || '';
    if (label) {
      label = '<div>' + label + ': </div>';
    }
    $('body').prepend(label + '<pre>' + s + '</pre>');
  }

  debug('start');

  $(document).ready(function () {

    var t
    //t=$('#productDetails_detailBullets_sections1 a[href="/gp/bestsellers/toys-and-games/166225011/ref=pd_zg_hrsr_toys-and-games"]').parent().parent();
    t = $('th:contains("ellers Rank")').parent();
    $('#dp-container').prepend(t.text());

  });

})();