Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
http://i.cdn.turner.com/cnn/.element/js/2.0/video/evp/module.js?loc=dom&vid=/video/world/2009/07/10/goodman.spain.pamplona.death.cnn said:var cnn_embed;
if (cnn_embed === undefined) {
cnn_embed = {
parseEmbedded: function() {
var arr_scripts = document.getElementsByTagName("script");
var ct = arr_scripts.length;
for (var i=0; i < ct; i++) {
var script = arr_scripts.src;
if (/\/\.element\/js\/2\.0\/video\/evp\/module.js\?/.test(script)) {
var script_id = arr_scripts.getAttribute('id');
if (!script_id) {
var seed = Math.random();
var url = cnn_embed.parseVars(script);
var vid_div = 'cnn_' + seed;
document.write('<div id=' + vid_div + '>' + script + '</div>');
cnn_embed.embedVideo(vid_div, url);
arr_scripts.setAttribute('id', 'cnn_' + (seed+1));
}
}
}
},
embedVideo: function(div_id, url) {
var div = document.getElementById(div_id);
var vid_id = url.vid;
var loc_id = url.loc;
var onsite_re = /cnn\.com$/i;
if (onsite_re.test(location.host)) {
var onsite_params = '';
if (typeof(cnnSectionName) !== 'undefined') {
onsite_params = '&cnnSectionName=' + escape(cnnSectionName);
}
if (typeof(cnnSubSectionName) !== 'undefined') {
onsite_params += '&cnnSubSectionName=' + escape(cnnSubSectionName);
}
div.innerHTML = '<iframe id="_cnn_iframe_' + Math.random() + '" src="http://www.cnn.com/video/savp/evp/?loc=onsite' + onsite_params + '&vid=' + vid_id + '" height="393" width="406" allowtransparency="true" frameborder="0" scrolling="no"></iframe>';
} else {
div.innerHTML = '<iframe id="_cnn_iframe_' + Math.random() + '" src="http://www.cnn.com/video/savp/evp/?loc=' + loc_id + '&vid=' + vid_id + '" height="393" width="406" allowtransparency="true" frameborder="0" scrolling="no"></iframe>';
}
},
parseVars: function(url) {
var turl = url;
turl = turl.slice(turl.indexOf('?')+1);
var ar = turl.split('&');
var b = {vid:'undefined', loc:'dom'};
for (var i = 0; i < ar.length; i++) {
var c = ar.split('=');
if (c[0].indexOf('vid') > -1) {
b['vid'] = c[1];
} else if (c[0].indexOf('loc') > -1) {
b['loc'] = c[1];
}
}
return b;
}
};
}
cnn_embed.parseEmbedded();