TW Night and day

The West Night and day 20:00-05:00 dark mode

  1. // ==UserScript==
  2. // @name TW Night and day
  3. // @version 1.00
  4. // @description The West Night and day 20:00-05:00 dark mode
  5. // @author HALCON DE ORO ty hiroaki
  6. // @include https://*.the-west.*/game.php*
  7. // @namespace https://gf.qytechs.cn/users/6511
  8. // ==/UserScript==
  9.  
  10.  
  11. (function(fn) {
  12. var newScript = document.createElement('script');
  13. newScript.setAttribute("type", "application/javascript");
  14. newScript.textContent = '(' + fn + ')();';
  15. (document.body || document.head || document.documentElement).appendChild(newScript);
  16. newScript.parentNode.removeChild(newScript);
  17. })(function() {
  18. TWNM = {
  19. version: '1.0',
  20. name: 'TW Night and day',
  21. author: 'HALCON DE ORO ty hiroaki',
  22. minGame: '2.01',
  23. maxGame: Game.version.toString(),
  24. website: 'https://gf.qytechs.cn/es/scripts/40157-tw-night-mode',
  25.  
  26. };
  27.  
  28. TheWestApi.register('TWNM', TWNM.name, TWNM.minGame, TWNM.maxGame, TWNM.author, TWNM.website).setGui('With this script you put the game in night mode');
  29. var brillo1="brightness(";
  30. var brillo2=100;
  31. var brillo3="%)";
  32. reload = function (){
  33. var d = new Date();
  34. var hora = d.getHours();
  35. if(hora>=20||hora<=5)
  36. {
  37. brillo2=50;
  38. }
  39. else
  40. {
  41. brillo2=100;
  42. }
  43. var brillototal=brillo1+brillo2+brillo3;
  44. $("#map").css({ "filter": brillototal, "-webkit-filter": brillototal });
  45. $("#ui_workcontainer").css({ "filter": brillototal, "-webkit-filter": brillototal });
  46. $("#ui_bottomleft").css({ "filter": brillototal, "-webkit-filter": brillototal });
  47. $("#ui_bottombar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  48. $("#ui_experience_bar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  49. $("#ui_topbar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  50. $("#ui_character_avatar_container").css({ "filter": brillototal, "-webkit-filter": brillototal });
  51. $("#windows").css({ "filter": brillototal, "-webkit-filter": brillototal });
  52. $("#ui_notibar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  53. $("#buffbars").css({ "filter": brillototal, "-webkit-filter": brillototal });
  54. $("#ui_menubar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  55. $("#ui_right").css({ "filter": brillototal, "-webkit-filter": brillototal });
  56. $("#ui_notifications").css({ "filter": brillototal, "-webkit-filter": brillototal });
  57. $("#hiro_friends_container").css({ "filter": brillototal, "-webkit-filter": brillototal });
  58. $("#custom_unit_counter_Easter_hasMousePopup_with_log").css({ "filter": brillototal, "-webkit-filter": brillototal });
  59. $("#westforts_link_div").css({ "filter": brillototal, "-webkit-filter": brillototal });
  60. $("#mpi-playerinfo").css({ "filter": brillototal, "-webkit-filter": brillototal });
  61. $("#mission-map-container").css({ "filter": brillototal, "-webkit-filter": brillototal });
  62. $("#popup_div_compare").css({ "filter": brillototal, "-webkit-filter": brillototal });
  63. $("#popup").css({ "filter": brillototal, "-webkit-filter": brillototal });
  64. $("#ui_windowdock").css({ "filter": brillototal, "-webkit-filter": brillototal });
  65.  
  66. $(".friendsbar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  67. $(".friendsbar-toggle").css({ "filter": brillototal, "-webkit-filter": brillototal });
  68. $(".custom_unit_counter.Easter.hasMousePopup.with_log").css({ "filter": brillototal, "-webkit-filter": brillototal });
  69. $(".tw2gui_selectbox").css({ "filter": brillototal, "-webkit-filter": brillototal });
  70. $(".tw2gui_dialog").css({ "filter": brillototal, "-webkit-filter": brillototal });
  71. $(".ui-loader-wrap").css({ "filter": brillototal, "-webkit-filter": brillototal });
  72. $(".mpi-ui-topbar").css({ "filter": brillototal, "-webkit-filter": brillototal });
  73. $(".mpi-abilities").css({ "filter": brillototal, "-webkit-filter": brillototal });
  74. $(".mpi-timeline.animate.horizontal").css({ "filter": brillototal, "-webkit-filter": brillototal });
  75. $(".teamlist.team-red.team-right").css({ "filter": brillototal, "-webkit-filter": brillototal });
  76. $(".teamlist.team-blue.team-left").css({ "filter": brillototal, "-webkit-filter": brillototal });
  77. $(".fancybanner.mpi-end-game-dialog").css({ "filter": brillototal, "-webkit-filter": brillototal });
  78.  
  79. };
  80. setInterval(function() {
  81. reload()
  82. }, 50);
  83. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址