Page 1 of 1

Dashboard width FIXED - making it resize with browser window

PostPosted: Sun Mar 19, 2017 10:30 pm
by judge_reinhold
One of the most annoying and easily fixed problems with CC.

Load a game page when your browser window is not maximized.

Then maximize your window, and what happens? The right side "dashboard" (with game log, snapshots, etc), stays super small.

It is absurdly, stupidly easy to fix, and yet has not been fixed in years.

So I fixed it.

Here you go, you're welcome.

// ==UserScript==
// @name FixDashboardWidth
// @namespace ccscripts
// @description Fix the idiotic dashboard width
// @include https://www.conquerclub.com/game.php?game=*
// @include http://www.conquerclub.com/game.php?game=*
// @version 1
// @grant none
// @copyright 2017+, J.R.
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

$(document).ready( function() {
console.log('Dashboard fix running');
$("#right_hand_side").css('width','');
$("#right_hand_side").css('max-width','800px'); // replace contents of last parentheses with the following to allow complete screen-filling: 'width','auto'
});


FYI, Dukasaur, it's caused by the fact that the DIV element "#right_hand_side" has an explicit width set when the page first loads. Probably one of your coders thought that would be clever. I can't imagine why.

So then if you resize your window, that element's width stays the same. I changed it to give it a maximium width. Giving it an automatic width would also have worked, but for me, 800px is wide enough.

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Mon Mar 20, 2017 6:06 pm
by Dukasaur
I've never had this problem, but I thank you for your efforts all the same! It's good to have people who care about fixing stuff.

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Mon Mar 20, 2017 6:26 pm
by riskllama
love that Judge!!!

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Wed Mar 22, 2017 8:24 am
by Dukasaur
riskllama wrote:love that Judge!!!


Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Tue Mar 28, 2017 12:30 am
by EBConquer
This is great! i've noticed that happens but usually just hit refresh to fix the problem but something automatic would be useful. How does one take the script and implement it? I'm a little thick when it comes to code.

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Sat Apr 01, 2017 6:12 am
by dgz345
EBConquer wrote:This is great! i've noticed that happens but usually just hit refresh to fix the problem but something automatic would be useful. How does one take the script and implement it? I'm a little thick when it comes to code.


greasemonkey or tampermonkey depending on your browser. its the same as the other userscripts

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Sun Apr 02, 2017 11:30 pm
by EBConquer
dgz345 wrote:
EBConquer wrote:This is great! i've noticed that happens but usually just hit refresh to fix the problem but something automatic would be useful. How does one take the script and implement it? I'm a little thick when it comes to code.


greasemonkey or tampermonkey depending on your browser. its the same as the other userscripts


Yay! thanks. It works like a charm.

For those not in the know. All's you need to do is the same thing you've done will all the other scripts you have. Just click 'Install'. :|

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Thu Apr 13, 2017 3:36 pm
by riskllama
how many "chat ban waiver" slips did Judge get for this?

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Sat Apr 22, 2017 12:51 am
by EBConquer
For whatever reason, this script screws up the panel snapshots. :?

Re: Dashboard width FIXED - making it resize with browser wi

PostPosted: Mon Jun 26, 2017 9:54 am
by iAmCaffeine
Does this work or not because the bug is fucking annoying?