munge the page when the DOM is ready (derp)

This commit is contained in:
Sami Samhuri 2012-04-21 11:20:35 -07:00
parent a1261a6bf0
commit c78acc5919

View file

@ -1,23 +1,26 @@
if (!window.__fiveShiftInjected__) {
window.__fiveShiftInjected__ = true
// load custom css
var head = document.getElementsByTagName('head')[0]
, css = document.createElement('link')
css.rel = 'stylesheet'
css.type = 'text/css'
css.href = 'http://samhuri.net/f/fiveshift.css?t=' + +new Date()
head.appendChild(css)
$(function() {
// These don't center properly via CSS for some reason
;[ '#masthead .container_24'
, '#content .container_24'
, '#content .container_24 .grid_15'
, '.sidebar'
].forEach(function(selector) {
$(selector).css('width', '97%')
})
// load custom css
var head = document.getElementsByTagName('head')[0]
, css = document.createElement('link')
css.rel = 'stylesheet'
css.type = 'text/css'
css.href = 'http://samhuri.net/f/fiveshift.css?t=' + +new Date()
head.appendChild(css)
// Fix up the viewport
$('meta[name="viewport"]').attr('content','width=device-width,initial-scale=1.0')
// These don't center properly via CSS for some reason
;[ '#masthead .container_24'
, '#content .container_24'
, '#content .container_24 .grid_15'
, '.sidebar'
].forEach(function(selector) {
$(selector).css('width', '97%')
})
// Fix up the viewport
$('meta[name="viewport"]').attr('content','width=device-width,initial-scale=1.0')
})
}