Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save laddered/450bf55d479b47d51c71ab055f90e4e9 to your computer and use it in GitHub Desktop.
Save laddered/450bf55d479b47d51c71ab055f90e4e9 to your computer and use it in GitHub Desktop.
используется на странице https://www.cbr.ru/key-indicators/
javascript: (function() {let gold=$("div.title-subinfo>div:contains('Золото')").closest("tr").find("td:last-child").text();gold=gold.replace(" ",""),gold=gold.replace(",","."),gold=parseFloat(gold).toFixed(2),console.log(gold);let dollar=$("div.title-subinfo>div:contains('Доллар США')").closest("tr").find("td:nth-child(2n)").text();dollar=dollar.replace(" ",""),dollar=dollar.replace(",","."),dollar=parseFloat(dollar).toFixed(2),console.log(dollar),alert("Стоимость золота на сегодня "+(gold/dollar).toFixed(2)+" USD");})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment