Created
February 4, 2018 20:32
-
-
Save lances101/3f43a22b79d8f9e07f346391b9437999 to your computer and use it in GitHub Desktop.
Hotline.ua UAH to EUR
This file contains 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 HotlineUA UAH to EUR | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Boromak | |
// @match http://hotline.ua/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var EURtoUAHRate = 34.52; | |
var nodes = $(".price-md .value"); | |
nodes.each(function(index) { | |
var priceUAH = parseInt($(this).text().split(" ").join("")); | |
var priceEUR = priceUAH / EURtoUAHRate; | |
$(this).text(priceEUR.toFixed(2)); | |
var parent = $(this).parent(); | |
parent.text(parent.text().replace("грн", "EUR")); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment