finchd
5/18/2017 - 3:16 AM

Make Blogspot width dynamic to fit window, not fixed 860px

Make Blogspot width dynamic to fit window, not fixed 860px

// ==UserScript==
// @name        Wide Blogspot
// @namespace   finchd
// @description Remove unnecessary fixed max-width
// @include     http://skythewood.blogspot.sg/
// @include     http://*.blogspot.*
// @include     http://*.blogspot.sg/
// @version     2
// @grant       none
// ==/UserScript==

if (document.getElementsByClassName('fauxcolumn-outer content-faux-column-outer')) {
  var s = document.createElement('style');
  s.type = "text/css";
  s.innerHTML = ".content-outer, .content-fauxcolumn-outer, .region-inner {" +
    "max-width:90% !important;" +
    "}";
  (document.head || document.documentElement).appendChild(s);
}
if (document.getElementsById('header')) {
  var s = document.createElement('style');
  s.type = "text/css";
  s.innerHTML = ".header {" +
    "width:90% !important;" +
    "}";
  (document.head || document.documentElement).appendChild(s);
}
if (document.getElementsById('description')) {
  var s = document.createElement('style');
  s.type = "text/css";
  s.innerHTML = ".description {" +
    "max-width:90% !important;" +
    "}";
  (document.head || document.documentElement).appendChild(s);
}
if (document.getElementsById('content')) {
  var s = document.createElement('style');
  s.type = "text/css";
  s.innerHTML = ".content {" +
    "width:90% !important;" +
    "}";
  (document.head || document.documentElement).appendChild(s);
}
if (document.getElementsById('main')) {
  var s = document.createElement('style');
  s.type = "text/css";
  s.innerHTML = ".main {" +
    "width:70% !important;" +
    "}"; //less width for right-hand archive navigation
  (document.head || document.documentElement).appendChild(s);
}