3 ms·
Wikipedia loads jQuery, so doing this works: https://gist.github.com/1631148 https://gist.github.com/1631148
by teeray 15y ago
Wikipedia loads jQuery, so doing this works: https://gist.github.com/1631148 https://gist.github.com/1631148
- Hrundi 15y agoTruly concise and elegant. I'm not sure a code-golf could make that much shorter!
- kennywinker 15y agoCame up with almost exactly that javascript:$('#mw-page-base, #mw-head-base, #content, #mw-head, #mw-panel, #footer').css('display','block'); $('#mw-sopaOverlay').css('display','none'); You beat me to it. :)
- baddox 15y agoSince you're using jQuery, you might as well just use show() and hide() or remove().
- th 15y agoAlso chaining: https://gist.github.com/1631368 https://gist.github.com/1631368
- baddox 15y agoI think that looks and scans worse. I didn't count characters, but it also seems like more characters. I bet it performs worse too (not that performance matters in this case).
- artursapek 15y agoAnd execute the first command just on $('div')
- WickyNilliams 15y agoor even better, use toggle(): jQuery("#mw-sopaOverlay, .noprint, #footer, #content").toggle();