‘;
var storytext = document.getElementById(‘storytext’);
var heightToSkip = 0;
function resetValues()
{
totalHeight = 0;
targetChildElement = null;
}
// Check if story is in the blacklist of articles to remove smartassets
// [2017.07.27] Results of a one-off request from r.barbieri
if(BLACKLIST[location.pathname] === true) {
return
}
if(storytext == null)
{
console.log(“Error finding storytext element for SA embed”);
return;
}
for ( i = 0; i 0)
{
heightToSkip -= storytext.childNodes[i].clientHeight;
resetValues();
}
else if(heightToSkip minHeight && targetChildElement != null)
{
//console.log(“total height = ” + totalHeight);
//console.log(“childNode = ” + targetChildElement);
storytext.childNodes[targetChildElement].insertAdjacentHTML(‘afterend’, smartAssetDiv);
smartasset = document.getElementById(‘smartasset-article’);
smartasset.style.float = ‘left’; // allows module to have text float to right
smartasset.style.marginRight =’20px’;
smartasset.style.marginBottom =’25px’;
//console.log(storytext.childNodes[targetChildElement]);
//SMARTASSET.setDivIndex(targetChildElement);
SMARTASSET.setSmartAssetScript();
/* bail out since we’re done */
break;
}
}
/* div with id=”smartassetcontainer”. Sanity check to only embed once */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘div’ && storytext.childNodes[i].id !== “undefined” && storytext.childNodes[i].id === “smartassetcontainer”) {
break;
}
/* div with id=”ie_column” */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘div’ && storytext.childNodes[i].id !== “undefined” && storytext.childNodes[i].id === “ie_column”) {
resetValues();
}
/* embeds from twitter, facebook, youtube */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘div’ && storytext.childNodes[i].classList.contains(’embed’)) {
resetValues();
}
/* cnn video player */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘div’ && storytext.childNodes[i].classList.contains(‘cnnplayer’)) {
resetValues();
}
/* images */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘img’)
{
resetValues();
}
/* images stored in figure tags */
else if (storytext.childNodes[i].nodeName.toLowerCase() === ‘figure’)
{
if(storytext.childNodes[i].clientWidth
The price Northrop (NOC) agreed to pay for Orbital represents a 22% premium over Friday’s closing price.
Earlier this month, United Technologies (UTX) bought Rockwell Collins (COL) for $23 billion. They’re two of the biggest suppliers to Boeing and Airbus.
CNNMoney (New York) First published September 18, 2017: 7:28 AM ET