User:Inductiveload/layout override.js

function set_layout_by_name(name){ if( self.ws_layouts[name]==undefined) return; //doesn't exists var i=0; for( key in self.ws_layouts ) { if(key==name) break; i++; } set_layout(i) }

function checkForLayoutOverrides {      if(wgNamespaceNumber!=0 && wgNamespaceNumber!=2 ) return; haveOverrider = $('#dynamic_layout_overrider').length > 0 ; if (haveOverrider){ layout_name = $('#dynamic_layout_overrider').html ; set_layout_by_name( layout_name ); } }

$( function { checkForLayoutOverrides } );