Extra KOC Adjustments

Adjusting some KOC things to make it easier to play

当前为 2023-05-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Extra KOC Adjustments
  3. // @namespace GameAdjustmentsKoC
  4. // @description Adjusting some KOC things to make it easier to play
  5. // @icon https://loading.io/s/icon/5fru9q.svg
  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 *.facebook.com/*
  11. // @include *.rockyou.com/rya/*
  12. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  13. // @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
  14. // @connect greasyfork.org
  15. // @grant GM_addStyle
  16. // @run-at document-end
  17. // @license CC-BY-4.0
  18.  
  19.  
  20. // @version 1.0.8
  21. // ==/UserScript==
  22.  
  23. function GM_addStyle(css) {
  24. var head, style;
  25. head = document.getElementsByTagName('head')[0];
  26. if (!head) { return; }
  27. style = document.createElement('style');
  28. style.type = 'text/css';
  29. style.innerHTML = css;
  30. head.appendChild(style);
  31. }
  32.  
  33. var tS = "top: 600px !important;";
  34.  
  35. const styles = [
  36. //Royal adjustments although I dont thing we do the royals anymore
  37. 'div.troopModal.largeModal.primaryContainer > div.borderbody > div.primarycontent { background: url("../img/troopBattle/troopBattle_bg.png") no-repeat #d2ad55 !important; height: 1300px !important;}',
  38. '.cmModalContainer.troopModal.cmModal1.largeModal.primaryContainer { height: 1300px !important;}', // Royal
  39. '.troopTopHalf > .wrapper > .troopSelectAttackingTroops { height: 925px !important;}',
  40. '.troopTopHalf { height: 965px !important;}', // Royal
  41. '.troopTopHalf > .wrapper > .troopSelectAttackingTroops .units { height: 793px; overflow-x: none;}',
  42. '.troopTopHalf > .wrapper > .troopSelectAttackingTroops { height: 870px !important;}', // Royal
  43.  
  44. //Conquest adjustments
  45. '.cmModalContainer.troopVictoryModal.recruit.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Lvl 1 Winner box adjustment
  46. '.cmModalContainer.troopVictoryModal.mercernary.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Lvl 2 Winner box adjustment
  47. '.cmModalContainer.troopVictoryModal.veteran.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Lvl 3 Winner box adjustment
  48. '.cmModalContainer.troopVictoryModal.hero.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Lvl 4 Winner box adjustment
  49. '.cmModalContainer.troopVictoryModal.conqueror.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Lvl 5 Winner box adjustment
  50. '.cmModalContainer.troopAttackModal.cmModal2.mediumModal.primaryContainer {' + tS +'}', // Conquest Progress Box
  51. '.cmModalContainer.troopVictoryModal.conqueror.cmModal3.mediumModal.primaryContainer {' + tS +'}',
  52.  
  53.  
  54.  
  55. //Jousting adjustments
  56. '.joustingMatchmaking .opponents .opponent {height: 656px !important;}', // Shows full stats on Jousting window when active
  57. '.joustingMatchmaking .stats_box {height: 564px !important;}', // Shows full stats on Jousting window when active
  58.  
  59. //FB adjustments
  60. '#ptJoustPop { top: 180px !important; height: 600px !important;}',
  61. '#pbjoust_info {height: 525px !important;max-height: 600px !important;overflow-y: auto !important;background-color: #fff;}',
  62. '#ptBossPop { top: 180px !important;}',
  63. '._31e { position: inherit !important;}', // stops scrolling
  64.  
  65.  
  66. ];
  67.  
  68. styles.forEach(GM_addStyle);
  69.  
  70. setInterval(GM_addStyle, 120000, "css");
  71.