Extra KOC Adjustments

Adjusting some KOC things to make it easier to play

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name			    Extra KOC Adjustments
// @namespace		  GameAdjustmentsKoC
// @description		Adjusting some KOC things to make it easier to play
// @icon
// @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			*apps.facebook.com/*
// @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			  *
// @connect	      greasyfork.org
// @grant	      GM_addStyle
// @run-at	      document-end

// @license       CC-BY-4.0


// @version		  	2.0.2
// ==/UserScript==



function GM_addStyle(css) {
    var head = document.getElementsByTagName('head')[0];
    if (!head) return;

    var style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

// ***** TR CARD SEARCH ******//
GM_addStyle(`
  #btthroneSearchEffectFilter,
  #btthroneSearchTypeFilter,
  #btthroneSearchQualityFilter,
  #btthroneSearchLevelFilter,
  #btthroneSearchJewelFilter,
  #btthroneSearchFactionFilter {
    height: 200px !important;
  }
`);

// **** SIDE SCROLL TR CARDS ***** //
(function() {
    'use strict';

    function convertScroll(e) {
        if (!e.deltaY) return;
        e.preventDefault();
        this.scrollLeft += e.deltaY + e.deltaX;
    }

    function attachScrollListener() {
        const element = document.getElementById('btthroneSearchResults');
        if (element) {
            element.addEventListener('wheel', convertScroll);
            return true;
        }
        return false;
    }

    if (!attachScrollListener()) {
        const intervalId = setInterval(() => {
            if (attachScrollListener()) {
                clearInterval(intervalId);
            }
        }, 500);
    }
})();


// ****** CONQUEST ADJUSTMENTS ******
GM_addStyle('div.troopModal.largeModal.primaryContainer > div.borderbody > div.primarycontent { background: url("../img/troopBattle/troopBattle_bg.png") no-repeat #d2ad55 !important; height: 1300px !important;');
GM_addStyle(".cmModalContainer.troopModal.cmModal1.largeModal.primaryContainer {  height: 1300px !important;}"); //Royal

GM_addStyle(`
  [class^="cmModalContainer"].troopVictoryModal.cmModal2.mediumModal.primaryContainer {
    top: 884px !important;
    left: 337px !important;
  }`);


GM_addStyle(`
  .troopTopHalf {
    height: 965px !important; /* Royal */
  }

  .troopTopHalf > .wrapper > .troopSelectAttackingTroops {
    height: 925px !important; /* General */
  }

  .troopTopHalf > .wrapper > .troopSelectAttackingTroops .units {
    height: 793px;
    overflow-x: none;
  }`);


// ****** JOUSTING ADJUSTMENTS ****** //
GM_addStyle(".joustingMatchmaking .opponents .opponent {height: 656px !important;}"); // Shows full stats on Jousting window when active
GM_addStyle(".joustingMatchmaking .stats_box {height: 564px !important;}"); // Shows full stats on Jousting window when active
GM_addStyle("#ptJoustPop {  top: 180px !important; height: 600px !important;}");
GM_addStyle("#pbjoust_info {height: 525px !important;max-height: 600px !important;overflow-y: auto !important;background-color: #fff;}");



// ****** BOSS BATTLE ADJUSTMENTS ****** //
GM_addStyle("#ptBossPop {  top: 180px !important;}");


// ****** FACEBOOK **** REMOVE SIDE BAR **** //
GM_addStyle('.x1cvmir6.x1n2onr6.x1t2pt76.x2lah0s.x78zum5.x2bj2ny {display:none !important;}');