User:Tyrok1/monobook.js: Difference between revisions

Content added Content deleted
No edit summary
(Attempting to force columns to contain a minimum of three primary language sections.)
Line 69: Line 69:
//figure out the ideal number of columns
//figure out the ideal number of columns
tocEl.style.width = "100%";
tocEl.style.width = "100%";
var idealColumns = Math.floor(GetElWidth(tocEl) / maxWidth);
var idealColumns = Math.min(Math.floor(GetElWidth(tocEl) / maxWidth), Math.floor(liEls.length / 3) + 1);
if(navigator.appVersion.indexOf("MSIE 5.") >= 0 || navigator.appVersion.indexOf("MSIE 6.") >= 0 || navigator.appVersion.indexOf("MSIE 7.") >= 0)
if(navigator.appVersion.indexOf("MSIE 5.") >= 0 || navigator.appVersion.indexOf("MSIE 6.") >= 0 || navigator.appVersion.indexOf("MSIE 7.") >= 0)
{
{