JSFiddle - React, Tailwind, and code Playground

by dledle2

HTML

<!-- 
 http://www.nytimes.com/2014/07/13/opinion/sunday/thomas-l-friedman-the-world-according-to-maxwell-smart-part-1.html
  // -->

JavaScript

try { /* WORKING--code below resets my changing and restores the default nytimes footer appearance somehow  */
    document.querySelectorAll('footer.story-footer8.story-content9')[0].className = 'story-footer story-content';
} catch (myErr2) {}

var myvar3 = document.querySelectorAll('footer.story-footer.story-content');

var myvar4 = myvar3[0];

var newFooterDynamicHTMLTag = document.createElement("footer");



newFooterDynamicHTMLTag.style.cssText = 'margin-left: 135px !important;width: 540px !important;     margin-top: 24px;margin-bottom: 45px;             display: block;         color: #333;       font-size: 100%;              width: 60px !important;    height: 1px;    display: inline-block;    background-color: #000;    margin: 0 0 13px;';




/* var add_news = document.createTextNode("The latest news goes here."); */
var add_news = document.createElement("mytagname1234");
newFooterDynamicHTMLTag.appendChild(add_news);

/* http://www.homeandlearn.co.uk/JS/create_html_elements.html */
/*  We have two arguments here, separated by a comma. The first argument is the new HTML element itself. The second argument is a location for the new element. */


/* document.body.insertBefore( newFooterDynamicHTMLTag,  document.body.childNodes(1)  );  */
myvar4.parentNode.insertBefore(newFooterDynamicHTMLTag, myvar3[0]);










/* var myvar33 = document.querySelectorAll('mytagname1234'); */
var myvar33 = document.querySelectorAll('footer.story-footer.story-content');
var myvar44 = myvar33[0];
var add_br = document.createElement("br");
myvar44.parentNode.insertBefore(add_br, myvar33[0]);











try { /* WORKING--code below resets my changing and restores the default nytimes footer appearance somehow  */
    document.querySelectorAll('footer.story-footer8.story-content9')[0].className = 'story-footer story-content';
} catch (myErr2) {}


var myvar3 = document.querySelectorAll('footer.story-footer.story-content');

var myvar4 = myvar3.item(0);

var myvar5 =...