Extra KOC Adjustments

Adjusting some KOC things to make it easier to play

当前为 2024-08-21 提交的版本,查看 最新版本

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