daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 29th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     function e() {
  3.         ($("input[name='frm_steempower']").val() < 0 || $("input[name='frm_steempower']").val() > 1e7) && $("input[name='frm_steempower']").val(1e7), ($("input[name='frm_votingpower']").val() < 0 || $("input[name='frm_votingpower']").val() > 100) && $("input[name='frm_votingpower']").val(100), ($("input[name='frm_voteweight']").val() < 0 || $("input[name='frm_voteweight']").val() > 100) && $("input[name='frm_voteweight']").val(100);
  4.         var e = $("input[name='frm_steempower']").val(),
  5.             t = $("input[name='frm_votingpower']").val(),
  6.             n = $("input[name='frm_voteweight']").val(),
  7.             r = e / a,
  8.             m = parseInt(100 * t * (100 * n) / p);
  9.         m = parseInt((m + 49) / 50);
  10.         var l = parseInt(r * m * 100) * i * o;
  11.         $("#vote_value").text(l.toFixed(2)), $("#vote_value").hide().fadeIn("fast")
  12.     }
  13.  
  14.     function t() {
  15.         steem.api.getRewardFund("post", function(e, t) {
  16.             n = t.reward_balance, r = t.recent_claims, i = n.replace(" STEEM", "") / r, $("#reward_balance").text(parseInt(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), $("#recent_claims").text(parseInt(r / 1e9).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + "B")
  17.         }), steem.api.getCurrentMedianHistoryPrice(function(e, t) {
  18.             o = t.base.replace(" SBD", "") / t.quote.replace(" STEEM", ""), $("#steem_price_sbd").text("$" + o.toFixed(2))
  19.         }), setTimeout(t, 1e4)
  20.     }
  21.     var a, n, r, i, o, p = 1e4;
  22.     steem.api.setOptions({
  23.         url: "https://api.steemit.com"
  24.     }), t();
  25.     var m = setInterval(function() {
  26.         void 0 !== o && (clearInterval(m), steem.api.getDynamicGlobalProperties(function(t, n) {
  27.             a = n.total_vesting_fund_steem.replace(" STEEM", "") / n.total_vesting_shares.replace(" VESTS", ""), e()
  28.         }))
  29.     }, 200);
  30.     $("#form_calc").on("submit", function(t) {
  31.         e(), t.preventDefault()
  32.     })
  33. });
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top