Created
March 4, 2021 23:23
-
-
Save jclusso/cd1fd80ea7e48fee437e9e7c03481f2e to your computer and use it in GitHub Desktop.
Convert AWS EC2 Pricing from Hourly to Monthly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AWS EC2 Pricing Hourly to Monthly | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Hourly to Monthly Pricing | |
// @author You | |
// @match https://aws.amazon.com/ec2/pricing/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(function() { | |
$("td").each(function() { | |
var el = $(this) | |
var match = el.text().match(/\$(\d.\d+) per Hour/) | |
if (match != null) { | |
var amount = parseFloat(match[1]); | |
el.html('$' + (amount * 750).toFixed(2) + ' per Month'); | |
} | |
}) | |
}, 2000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment