mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
munge the page when the DOM is ready (derp)
This commit is contained in:
parent
a1261a6bf0
commit
c78acc5919
1 changed files with 20 additions and 17 deletions
|
|
@ -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')
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue