Fast Packs

Removes animations that play when opening supply packs

  1. // ==UserScript==
  2. // @name Fast Packs
  3. // @namespace sabbasofa.fastpacks
  4. // @version 0.4
  5. // @description Removes animations that play when opening supply packs
  6. // @author Hemicopter [2780600]
  7. // @match https://www.torn.com/item.php
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=torn.com
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14.  
  15. //Removes all images, leaving only the result text and buttons.
  16. //This should prevent the "Use Another" button moving most of the time
  17. let removeVisuals = true;
  18.  
  19.  
  20.  
  21. // cc Manuito
  22. let GM_addStyle = function(s) {
  23. let style = document.createElement("style");
  24. style.type = "text/css";
  25. style.innerHTML = s;
  26. document.head.appendChild(style);
  27. };
  28.  
  29. GM_addStyle(`
  30. .d .pack-open-content.disabled-link .pack-open-msg a.open-another-cache {
  31. pointer-events: auto !important;
  32. cursor: default !important;
  33. color: var(--default-blue-color) !important;
  34. }
  35.  
  36. .d .pack-open-msg {
  37. animation-duration: 0s !important;
  38. animation-delay: 0s !important;
  39. }
  40.  
  41. .d .animated-fadeIn {
  42. opacity: 1 !important;
  43. }
  44.  
  45. .d .animated {
  46. animation-duration: 0s !important;
  47. }
  48.  
  49. .d .pack-open-result .cache-item:nth-child(2) {
  50. animation-delay: 0s !important;
  51. }
  52.  
  53. .d .pack-open-result .item-amount {
  54. animation: none !important;
  55. animation-delay: 0s !important;
  56. opacity: 1 !important;
  57. }
  58.  
  59. .r .pack-open-result {
  60. animation-name: none !important;
  61. animation-duration: 0s !important;
  62. }
  63.  
  64. .d .pack-open-result-divider.visible {
  65. transition: none !important;
  66. }
  67. `);
  68.  
  69. if(removeVisuals) {
  70. GM_addStyle(`
  71. .pack-open-result {
  72. visibility: hidden !important;
  73. height: 0px !important;
  74. }
  75. .d .cache_wrapper,
  76. .d .pack-open-result-divider {
  77. display: none !important
  78. }
  79. `);
  80. }
  81.  
  82. })();