Skip to content

Instantly share code, notes, and snippets.

@AxDSan
Created November 7, 2018 22:24
Show Gist options
  • Save AxDSan/0dbc1c2601fdaac27a2b735f2cbedffc to your computer and use it in GitHub Desktop.
Save AxDSan/0dbc1c2601fdaac27a2b735f2cbedffc to your computer and use it in GitHub Desktop.
Shows webshop prices as USD - GameZBD
// ==UserScript==
// @name GamezBD Webshop Cash to USD
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author 0x90
// @match http://gamezbd.net/webshop*
// @require https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js
// @grant none
// ==/UserScript==
(function() {
'use strict';
var row = 1;
var price = 0;
var originalText ='';
$('table tr').each(function() {
var td = $('table > tbody > tr:nth-child(' + row + ') > td:nth-child(4)');
originalText = td.text()
price = parseInt(td.text())
price = price / 500
td.text('$' + price + ' USD' + ' ('+ originalText +')')
row += 1;
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment