TEXT 45
Number format TBC patch Guest on 20th May 2020 02:06:55 PM
  1. ---
  2.  bitcoinapp.js |   12 ++++++++++++
  3.  1 files changed, 12 insertions(+), 0 deletions(-)
  4.  
  5. diff --git a/bitcoinapp.js b/bitcoinapp.js
  6. index 76fb54a..b5b82de 100644
  7. --- a/bitcoinapp.js
  8. +++ b/bitcoinapp.js
  9. @@ -513,6 +513,18 @@ function BitcoinApp() {
  10.  
  11.                         return s;
  12.                 }
  13. +
  14. +               Number.prototype.formatTBC = function(addSign) {
  15. +                       var s = this.toString(16);
  16. +                       s = s.replace(/9/g, "\ue9d9").replace(/a/gi, "\ue9da").replace(/b/gi, "\ue9db").replace(/c/gi, "\ue9dc").replace(/d/gi, "\ue9dd").replace(/e/gi, "\ue9de").replace(/f/gi, "\ue9df");
  17. +
  18. +                       s += " TBC";
  19. +
  20. +                       if(addSign && this > 0)
  21. +                               s = "+" + s;
  22. +
  23. +                       return s;
  24. +               }
  25.         }
  26.  
  27.         this.serializeSettings = function(request) {
  28. --
  29. 1.7.2.2

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.