Skip to content

Instantly share code, notes, and snippets.

@jotaelesalinas
Created October 3, 2017 08:00
Show Gist options
  • Save jotaelesalinas/287d308ad1508fa8c01944771c62dd63 to your computer and use it in GitHub Desktop.
Save jotaelesalinas/287d308ad1508fa8c01944771c62dd63 to your computer and use it in GitHub Desktop.
var selectors = [
'.metabar'
, 'main > article > header'
, '.js-stickyFooter'
, '.supplementalPostContent'
, '.js-postFooterPlacements'
, 'footer > .container > section'
, '.postActions'
, '.postPromotionWrapper'
, '.js-postFooterPlacements'
, '.js-postShareWidget'
];
var e = false;
for ( var i = 0, l = selectors.length; i < l; i++ ) {
while ( e = document.querySelector(selectors[i]) ) {
e.parentElement.removeChild(e);
}
}
var p = false;
while ( e = document.querySelector('iframe') ) {
p = e.parentElement
.parentElement
.parentElement
.parentElement;
p.parentElement.removeChild(p);
}
e = document.querySelectorAll('.sectionLayout--insetColumn');
for ( var i = 0, l = e.length; i < l; i++ ) {
e[i].style.maxWidth = 'inherit';
}
e = document.querySelectorAll('.postArticle--full .graf--layoutOutsetLeft');
for ( var i = 0, l = e.length; i < l; i++ ) {
e[i].style.marginLeft = '0';
e[i].style.width = '30%';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment