atWARned

Improve atWar's webgame display

  1. // ==UserScript==
  2. // @name atWARned
  3. // @name:fr atWARned
  4. // @namespace atwarned
  5. // @description Improve atWar's webgame display
  6. // @description:fr Améliore l'affichage du jeu web atWar
  7. // @author oliezekat
  8. // @include https://atwar-game.com/*
  9. // @include https://*.atwar-game.com/*
  10. // @version 1
  11. // @grant GM_addStyle
  12. // @grant GM_log
  13. // ==/UserScript==
  14.  
  15. // Unique object
  16. if (!atWARned) var atWARned = {};
  17.  
  18. atWARned =
  19. {
  20. /* Requires modules */
  21. Log: {},
  22. Renders: {}
  23. };
  24. atWARned.Init = function()
  25. {
  26. /* Init Log */
  27. this.Log.Init(this);
  28. this.Log._Enabled = false;
  29. this.Log.Add('Start...');
  30.  
  31. this.Renders.Init(this);
  32. // Common features
  33. this.Renders.Set_NoVisualEffects_Styles();
  34. this.Log.Add('End.');
  35. };
  36. atWARned.Log =
  37. {
  38. _Parent: null,
  39. _Enabled: false
  40. };
  41. atWARned.Log.Init = function(parent)
  42. {
  43. this._Parent = parent;
  44. };
  45. atWARned.Log.Add = function(msg)
  46. {
  47. if (this._Enabled == true)
  48. {
  49. GM_log(msg);
  50. }
  51. };
  52. atWARned.Renders =
  53. {
  54. _Parent: null
  55. };
  56. atWARned.Renders.Init = function(parent)
  57. {
  58. this._Parent = parent;
  59. };
  60. atWARned.Renders.Set_NoVisualEffects_Styles = function()
  61. {
  62. var default_style = '\
  63. * {\
  64. border-radius:none !important;\
  65. border-bottom-left-radius: 0 !important;\
  66. border-bottom-right-radius: 0 !important;\
  67. border-top-left-radius: 0 !important;\
  68. border-top-right-radius: 0 !important;\
  69. box-shadow: none !important;\
  70. text-shadow: none !important;\
  71. transform: none !important;\
  72. transition: none !important;\
  73. }\
  74. .bottom-toolbar-chat #chat_expanded,\
  75. .bottom-toolbar-chat #chat_settings {\
  76. background-image:none !important;\
  77. background-color:rgba(0,0,0,0.4);\
  78. }\
  79. .game-modal .modal-dialog .modal-content {\
  80. background-color:#000 !important;\
  81. }\
  82. .game-modal .striped > div:nth-child(2n+1),\
  83. .game-modal .table-striped > tbody > tr:nth-child(2n+1) > td,\
  84. .game-modal .table-striped > tbody > tr:nth-child(2n+1) > th {\
  85. }\
  86. #chatbox_website {\
  87. background-image:none !important;\
  88. background-color:#111;\
  89. }\
  90. #chatbox_website #chat_players,\
  91. #chatbox_website #chat_players_pills {\
  92. background:none !important;\
  93. }\
  94. ';
  95. GM_addStyle(default_style);
  96. };
  97.  
  98. atWARned.Init();