Skip to content

Instantly share code, notes, and snippets.

@lances101
Created February 4, 2018 20:32
Show Gist options
  • Save lances101/3f43a22b79d8f9e07f346391b9437999 to your computer and use it in GitHub Desktop.
Save lances101/3f43a22b79d8f9e07f346391b9437999 to your computer and use it in GitHub Desktop.
Hotline.ua UAH to EUR
// ==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