Extra KOC Adjustments

Adjusting some KOC things to make it easier to play

当前为 2024-04-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Extra KOC Adjustments
  3. // @namespace GameAdjustmentsKoC
  4. // @description Adjusting some KOC things to make it easier to play
  5. // @icon
  6. // @homepageURL https://greasyfork.org/en/scripts/408233-extra-koc-adjustments
  7. // @include *.rycamelot.com/*main_src.php*
  8. // @include *.beta.rycamelot.com/*main_src.php*
  9. // @include *apps.facebook.com/kingdomsofcamelot/*
  10. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  11. // @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
  12. // @connect *
  13. // @connect greasyfork.org
  14. // @grant GM_addStyle
  15. // @run-at document-end
  16.  
  17. // @license CC-BY-4.0
  18.  
  19.  
  20. // @version 2.0.1
  21. // ==/UserScript==
  22.  
  23.  
  24.  
  25. function GM_addStyle(css) {
  26. var head = document.getElementsByTagName('head')[0];
  27. if (!head) return;
  28.  
  29. var style = document.createElement('style');
  30. style.type = 'text/css';
  31. style.innerHTML = css;
  32. head.appendChild(style);
  33. }
  34.  
  35. // ***** TR CARD SEARCH ******//
  36. GM_addStyle(`
  37. #btthroneSearchEffectFilter,
  38. #btthroneSearchTypeFilter,
  39. #btthroneSearchQualityFilter,
  40. #btthroneSearchLevelFilter,
  41. #btthroneSearchJewelFilter,
  42. #btthroneSearchFactionFilter {
  43. height: 200px !important;
  44. }
  45. `);
  46.  
  47. // **** SIDE SCROLL TR CARDS ***** //
  48. (function() {
  49. 'use strict';
  50.  
  51. function convertScroll(e) {
  52. if (!e.deltaY) return;
  53. e.preventDefault();
  54. this.scrollLeft += e.deltaY + e.deltaX;
  55. }
  56.  
  57. function attachScrollListener() {
  58. const element = document.getElementById('btthroneSearchResults');
  59. if (element) {
  60. element.addEventListener('wheel', convertScroll);
  61. return true;
  62. }
  63. return false;
  64. }
  65.  
  66. if (!attachScrollListener()) {
  67. const intervalId = setInterval(() => {
  68. if (attachScrollListener()) {
  69. clearInterval(intervalId);
  70. }
  71. }, 500);
  72. }
  73. })();
  74.  
  75.  
  76. // ****** CONQUEST ADJUSTMENTS ******
  77. GM_addStyle('div.troopModal.largeModal.primaryContainer > div.borderbody > div.primarycontent { background: url("../img/troopBattle/troopBattle_bg.png") no-repeat #d2ad55 !important; height: 1300px !important;');
  78. GM_addStyle(".cmModalContainer.troopModal.cmModal1.largeModal.primaryContainer { height: 1300px !important;}"); //Royal
  79.  
  80. GM_addStyle(`
  81. [class^="cmModalContainer"].troopVictoryModal.cmModal2.mediumModal.primaryContainer {
  82. top: 884px !important;
  83. left: 337px !important;
  84. }`);
  85.  
  86.  
  87. GM_addStyle(`
  88. .troopTopHalf {
  89. height: 965px !important; /* Royal */
  90. }
  91.  
  92. .troopTopHalf > .wrapper > .troopSelectAttackingTroops {
  93. height: 925px !important; /* General */
  94. }
  95.  
  96. .troopTopHalf > .wrapper > .troopSelectAttackingTroops .units {
  97. height: 793px;
  98. overflow-x: none;
  99. }`);
  100.  
  101.  
  102. // ****** JOUSTING ADJUSTMENTS ****** //
  103. GM_addStyle(".joustingMatchmaking .opponents .opponent {height: 656px !important;}"); // Shows full stats on Jousting window when active
  104. GM_addStyle(".joustingMatchmaking .stats_box {height: 564px !important;}"); // Shows full stats on Jousting window when active
  105. GM_addStyle("#ptJoustPop { top: 180px !important; height: 600px !important;}");
  106. GM_addStyle("#pbjoust_info {height: 525px !important;max-height: 600px !important;overflow-y: auto !important;background-color: #fff;}");
  107.  
  108.  
  109.  
  110. // ****** BOSS BATTLE ADJUSTMENTS ****** //
  111. GM_addStyle("#ptBossPop { top: 180px !important;}");
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.