Pages: [1]   Go Down
Print
Author Topic: css dinamici  (Read 840 times)
0 Members e 1 Utente non registrato stanno visualizzando questa discussione.
]G|nk0[
Matricola
*
Offline Offline

Gender: Male
Posts: 27


« on: 27-05-2010, 15:19:17 »

questo codice cambia l' interfaccia dell' home page di facebook ( quella con le news per intenderci )

have fun

Code:
document.getElementsByTagName('head')[0].appendChild( document.createElement('style') )
var mys = document.styleSheets.item( document.styleSheets.length - 1 )
mys.disabled = 1
mys.insertRule( '.hasLeftCol #contentCol { margin-left: 0px }', 0 )
mys.insertRule( '.commentable_item .ufi_section { width: 100% }',0 )
mys.insertRule( '.hasLeftCol #leftCol, #rightCol { display: none }', 0 )
var uisw = document.createElement('li')
uisw.appendChild( document.createElement('a') )
uisw.firstChild.appendChild( document.createTextNode('Switch') )
uisw.onclick = function() { mys.disabled = ! mys.disabled }
document.getElementById( 'pageNav' ).appendChild( uisw )
Logged

Enrico Stampa
Pages: [1]   Go Up
Print
Jump to: