Extra KOC Adjustments

Adjusting some KOC things to make it easier to play

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name			    Extra KOC Adjustments
// @namespace		  GameAdjustmentsKoC
// @description		Adjusting some KOC things to make it easier to play
// @icon			    https://loading.io/s/icon/5fru9q.svg
// @homepageURL   https://greasyfork.org/en/scripts/408233-extra-koc-adjustments
// @include			  *.rycamelot.com/*main_src.php*
// @include			  *.beta.rycamelot.com/*main_src.php*
// @include			  *apps.facebook.com/kingdomsofcamelot/*
// @include			  *.facebook.com/*
// @include			  *.rockyou.com/rya/*
// @require			  http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require			  http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
// @connect	      greasyfork.org
// @grant	        GM_addStyle
// @run-at	      document-end
// @license       CC-BY-4.0


// @version		  	1.0.8
// ==/UserScript==

function GM_addStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

var tS = "top: 600px !important;";

const styles = [
  //Royal adjustments although I dont thing we do the royals anymore
  'div.troopModal.largeModal.primaryContainer > div.borderbody > div.primarycontent { background: url("../img/troopBattle/troopBattle_bg.png") no-repeat #d2ad55 !important; height: 1300px !important;}',
  '.cmModalContainer.troopModal.cmModal1.largeModal.primaryContainer { height: 1300px !important;}', // Royal
  '.troopTopHalf > .wrapper > .troopSelectAttackingTroops { height: 925px !important;}',
  '.troopTopHalf { height: 965px !important;}', // Royal
  '.troopTopHalf > .wrapper > .troopSelectAttackingTroops .units { height: 793px; overflow-x: none;}',
  '.troopTopHalf > .wrapper > .troopSelectAttackingTroops { height: 870px !important;}', // Royal

  //Conquest adjustments
  '.cmModalContainer.troopVictoryModal.recruit.cmModal2.mediumModal.primaryContainer {' + tS +'}',             // Conquest Lvl 1 Winner box adjustment
  '.cmModalContainer.troopVictoryModal.mercernary.cmModal2.mediumModal.primaryContainer {' + tS +'}',          // Conquest Lvl 2 Winner box adjustment
  '.cmModalContainer.troopVictoryModal.veteran.cmModal2.mediumModal.primaryContainer {' + tS +'}',             // Conquest Lvl 3 Winner box adjustment
  '.cmModalContainer.troopVictoryModal.hero.cmModal2.mediumModal.primaryContainer {' + tS +'}',                // Conquest Lvl 4 Winner box adjustment
  '.cmModalContainer.troopVictoryModal.conqueror.cmModal2.mediumModal.primaryContainer {' + tS +'}',           // Conquest Lvl 5 Winner box adjustment
  '.cmModalContainer.troopAttackModal.cmModal2.mediumModal.primaryContainer {' + tS +'}',                      // Conquest Progress Box
  '.cmModalContainer.troopVictoryModal.conqueror.cmModal3.mediumModal.primaryContainer {' + tS +'}',



  //Jousting adjustments
  '.joustingMatchmaking .opponents .opponent {height: 656px !important;}', // Shows full stats on Jousting window when active
  '.joustingMatchmaking .stats_box {height: 564px !important;}', // Shows full stats on Jousting window when active

  //FB adjustments
  '#ptJoustPop {  top: 180px !important; height: 600px !important;}',
  '#pbjoust_info {height: 525px !important;max-height: 600px !important;overflow-y: auto !important;background-color: #fff;}',
  '#ptBossPop {  top: 180px !important;}',
  '._31e { position: inherit !important;}', // stops scrolling


];

styles.forEach(GM_addStyle);

setInterval(GM_addStyle, 120000, "css");