Advertisement
Guest User

Untitled

a guest
May 19th, 2017
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <head>
  2. <script src="nui://game/ui/jquery.js" type="text/javascript"></script>
  3. <script>
  4. function addCommas(nStr) {
  5. nStr += '';
  6. var x = nStr.split('.');
  7. var x1 = x[0];
  8. var x2 = x.length > 1 ? '.' + x[1] : '';
  9. var rgx = /(\d+)(\d{3})/;
  10. while (rgx.test(x1)) {
  11. x1 = x1.replace(rgx, '$1' + '<span style="margin-left: 3px; margin-right: 3px;"/>' + '$2');
  12. }
  13. return x1 + x2;
  14. }
  15.  
  16. window.onload = function(e){
  17. window.addEventListener('message', function(event){
  18. if(event.data.updateJob == true) {
  19. $('.job').html('<p id="job"><img id="icon" src="job-icon.png" alt=""/>' +addCommas(event.data.job)+'</p>')
  20. }
  21. })
  22. }
  23. </script>
  24. <style>
  25. @font-face {
  26. font-family: 'pricedown';
  27. src: url(pricedown.ttf);
  28. }
  29. * {
  30. font-family: pricedown;
  31. }
  32. .container {
  33. margin: 0;
  34. padding: 0;
  35. position: absolute;
  36. top: 110;
  37. right: 20;
  38. width: 800px;
  39. height: 200px;
  40. }
  41.  
  42. #job {
  43. float:right;
  44. font-family: pricedown;
  45. font-weight: 700;
  46. font-size: 30px;
  47. color: white;
  48. padding: 4px;
  49. text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  50. margin: 0;
  51. margin-right: 6px;
  52. }
  53. #icon {
  54. height: 21px;
  55. width: auto;
  56. margin-right: 10px;
  57. }
  58. #pre {
  59. font-size: 0.8rem;
  60. margin-right: 5px;
  61. }
  62. .job {
  63. display: inline-block;
  64. height: 30px;
  65. width: 100%;
  66. }
  67. </style>
  68. </head>
  69.  
  70. <body>
  71. <div class="container">
  72. <div class="job">
  73. </div>
  74. </div>
  75. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement