Page 1 of 2
msnbc video ads
Posted: Sun Feb 17, 2008 5:29 pm
by mail
Hi there, I there any way to block the video ads that show up on Msnbc's new video player? The new one that usese Flash Player 9 on msnbcmeda.msn.com
TIA for any help you can provide.
Posted: Sun Feb 17, 2008 7:23 pm
by rick752
Unfortunately, "no".
Afaict, the beginning ad info is an integrated part of the working video. Without the embedded ad images being allowed, the video won't work at all. Sorry

Too bad
Posted: Mon Feb 18, 2008 12:00 pm
by mail
Well, that's too bad. Thanks for all your work!
Posted: Mon Feb 18, 2008 3:02 pm
by gustoflax
I picked the first video I saw and found some ad code for the masters to ply their trade
http://www.msnbc.msn.com/id/21134540/vp ... 1#23200062
I also toyed with
http://msnbcmedia.msn.com/i/msnbc/Compo ... d=21134540
blocking this killed video playback
http://rad.msn.com/ADSAdClient31.dll?GetAd=*
allow
http://www.msnbc.msn.com/default.cdnx/i ... 57/?t=.flv
some ad preferences live in xml
http://msnbcmedia.msn.com/i/msnbc/Compo ... 630660.xml
http://msnbcmedia.msn.com/i/msnbc/Compo ... tain_2.xml
some ad code hiding in here above my pay grade to decipher
http://www.msnbc.msn.com/id/22399193/
Code: Select all
function FlashComExternalObject(vID,flashObj,rpObj,surveyObj){ var This=this; this.vID=vID; this.repObj=document.getElementById(rpObj); this.adUrls=new Object(); this.adRef="/"; this.collapseAfterAd=true; this.adLoaded=false; this.flashObj=flashObj; this.launch=function(s){var v=window.open("http://www.msnbc.msn.com/id/21134540/vp/"+s+"#"+s,"_top");}; this.setId=function(s){s=s.replace(/root1/,"");This.adRef=s+"/adMC";}; this.setQuery=function(qs){location.hash="#"+qs;}; this.adCall=function(s){flashObj.flashObj.TGotoLabel(This.adRef,s);flashObj.flashObj.TPlay(This.adRef);}; this.expandAd=function(){This.adCall("NGAPExpand");if(This.collapseAfterAd){setTimeout(This.vID+".collapseAd()",1000);}This.collapseAfterAd=false;}; this.collapseAd=function(){This.adCall("NGAPCollapse");}; this.msnPreRoll=function(adDataObj){This.collapseAfterAd=adDataObj.collapseOnLoad;This.adUrls=adDataObj.trackgroup;}; this.report=function(rUrl){if(flashObj.report){var iRep=document.createElement("img");iRep.src=rUrl;This.repObj.appendChild(iRep);}}; this.track=function(s){This.report(s);}; this.getSess=function(){var tm=new Date();var sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed;return sess;}; this.neilson=function(head,bAd,sourceName,videoId){var nUrl="http://secure-us.imrworldwide.com/cgi-bin/m?ci=us-400132";nUrl+="&tl=dav0-"+escape(head)+((bAd)?"&c3=st,a":"")+"&c6=vc,c03&cg="+escape(sourceName);nUrl+="&cc=1&rnd="+(Math.random()*10000000000000000);This.report(nUrl);if(videoId){try{document.title=flashObj.titlePrefix+": "+head;window.status=flashObj.titlePrefix;This.setQuery(videoId);}catch(e){}}}; var setProp=function(s){if (s){return s;}return "";}; this.omMsnbc=function(aProps){s_prop1=setProp(aProps[1]);s_prop2=setProp(aProps[2]);s_prop4=setProp(aProps[4]);s_prop5=setProp(aProps[5]);s_prop7=flashObj.config;s_prop15=setProp(aProps[15]);s_prop16=setProp(aProps[16]);s_prop26=setProp(aProps[26]);s_prop35=setProp(aProps[35]);s_prop37=flashObj.flash;s_prop42=setProp(aProps[42]);s_prop43=setProp(aProps[43]);s_prop44=setProp(aProps[44]);s_prop45=setProp(aProps[45]);s_prop47=setProp(aProps[47]);s_prop38=setProp(aProps[38]);if (s_prop16!="Video Up Next"){s_pageName=s_prop16+"|"+s_prop4+"|"+s_prop5+"|"+s_prop15+"|"+s_prop2;}else{s_pageName=s_prop16;};if (s_prop43||s_prop47||s_prop35){};if(flashObj.report){s_gs(s_account);};}; this.omniture=function(party,prop37,prop38){switch(party){case "msn":var tm=new Date();var t=tm.getDate()+'/'+tm.getMonth()+'/'+tm.getYear()+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset();var msUrl="http://msnportal.112.2o7.net/b/ss/msnportalvideotransform,msnportalenusvideo/0/FAS-1.1/"+This.getSess()+"?[AQB]&ndh=1&t="+t+"&s="+flashObj.omniscreen+"&ce=UTF-8&ns=msnportalvideotransform&ch=MSNvideo^msnbc&c3=MSNvideo^msnbc&server=www.msnbc.msn.com&c1=MSNvideo^msnbc^"+flashObj.config+"&c2=en-us&"+prop37+"&[AEQ]?";This.report(msUrl);break;}}; this.fsC=function(a,b){if (a.toLowerCase().indexOf("url")==0){var w=window.open(This.adUrls[a.toLowerCase()]);}else{if (a=="adLoaded"){setTimeout(This.vID+".expandAd()",1);This.adLoaded=true;}if (a=="expand"){setTimeout(This.vID+".expandAd()",1);}if (a=="collapse"){This.adCall("NGAPCollapse");}if (This.adUrls[a.toLowerCase()]){This.report(This.adUrls[a.toLowerCase()]);}if (a.toLowerCase()=="ngapreplay"){This.report(This.adUrls["replay"]);This.adCall("NGAPExpand");}}}; this.doTPS=function(url,img){if(img){This.report(img);}if(!url){if (img.indexOf(".js")>0){url=img;}else{return;}}var sDiv=document.getElementById(surveyObj);sDiv.appendChild(document.createElement("
and some more ad code in here
http://www.msnbc.msn.com/js/std.js
Code: Select all
function showLeaveBehindAd(){}
function pd_onl(){if(pd_me.isS)moveByline();pop_ShowTabs();boxMove("bba","bb1","bb2");boxMove("bbb","bb3","bb4");if(nm_nIE)nm_done();if(pd_me.onlNext!=null)pd_me.onlNext();HideAdFramesAndChangeTitles();renderTimestampIcon();}
function nm_mx(nD,b){var aOff=document.getElementById('nm_c'+(nD+1)).nm_aOff;if(aOff){if(nm_sx(aOff[0].className)=='H'){aOff[0].className=aOff[0].className.slice(0,-1);aOff[0].firstChild.className=aOff[0].firstChild.className.slice(0,-1);}}for(var iD=nD+1;iD<=nm_nD;iD++){var shim=nm_gs(iD);if(shim)shim.style.display="none";if(iD==1&&nwAdOps&&nwAdOps.parentNode){nwAdOps.parentNode.removeChild(nwAdOps);}var oC=document.getElementById('nm_c'+iD);oC.nm_aOff=0;oC.innerHTML='';}nm_nD=nD;}
function ad_dap(nHeight,nWidth,sAdStr){if(window['dap']){dap(sAdStr,nWidth,nHeight);}}
function ad_dap(nHeight,nWidth,sAdStr){if(window['dap']){dap(sAdStr,nWidth,nHeight);}}
function ad_nw(sAdStr){if(window['placeAd']){placeAd(sAdStr,'newsweek.'+window.section_name);}}
function IsRSSUser(){if(pd_me==null)pd_me=new Object;if(!(pd_me.hasOwnProperty('IsRSSUser'))){if(location.href.indexOf('from=rss')>-1)SetCookie("FROMRSS","true");pd_me.IsRSSUser=(readCookie("FROMRSS")=="true");pd_me.AdsToHide="";}return pd_me.IsRSSUser;}
function AddAdToHide(AdFieldName){if(pd_me==null)pd_me=new Object;if(pd_me.hasOwnProperty('AdsToHide'))pd_me.AdsToHide=pd_me.AdsToHide+" "+AdFieldName;else pd_me.AdsToHide=AdFieldName;}
function HideAdFramesAndChangeTitles(){if(pd_me==null)return;if(pd_me.hasOwnProperty('AdsToHide')){var ads=pd_me.AdsToHide.split(' ');for(var i=0;i<ads.length;i++){HideAdFrame(ads[i]);}}var F=getObj('AdBrokerButtons_F');if(F!=null){var Has=false;for(var j=1;j<=10;j++){var adframe=getObj('AdBrokerButton'+j+'_F1');if(adframe!=null&&adframe.style.display!='none'){Has=true;break;}}if(!Has)F.style.display='none';}}
function bNoDBrokenButton(){var b=true;var adframe;for(var j=1;j<=4;j++){adframe=getObj('DColBrokerButton'+j+'_F1');if(adframe!=null&&adframe.style.display!='none'){b=false;break;}}return b;}
function HideAdFrame(AdName){if(pd_me!=null&&pd_me.hasOwnProperty('AdsToHide')&&pd_me.AdsToHide.indexOf(AdName)>-1){for(var j=1;j<=10;j++){var adframe=getObj(AdName+"_F"+j);if(adframe)adframe.style.display='none';else break;}if(AdName=='AdSponsor'){var F=getObj('AdSponsor_F');if(F!=null&&getObj('BreadCrumb_F').innerHTML.length<10)F.style.display='none';}}}
function ChangeSponsorAdTitle(){if(pd_me!=null){var AdTitle;if(pd_me.hasOwnProperty('SAdTitle')){AdTitle=getObj('SAdTitle');if(AdTitle)AdTitle.innerHTML=pd_me.SAdTitle;}if(pd_me.hasOwnProperty('STSAdTitle')){AdTitle=getObj('STSAdTitle');if(AdTitle)AdTitle.innerHTML=pd_me.STSAdTitle;}}}
function CB_Aff_DateTime(sDateTime){try{var aDTRaw=sDateTime.split(",");var aDateTime=aDTRaw[1].split(" ");var aTime=aDateTime[4].split(":");var sTime;if(aTime[0]>12){sTime=aTime[0]-12+":"+aTime[1]+" p.m.";}else{sTime=aTime[0]+":"+aTime[1]+" a.m.";}if(sTime.charAt(0)=="0"){sTime=sTime.substr(1);}if(!(sTime.indexOf("NaN")>-1)&&!(aDateTime[2].indexOf("NaN")>-1)&&!(aDateTime[1].indexOf("NaN")>-1)){document.write(sTime+", "+aDateTime[2]+". "+aDateTime[1]);}}catch(err){}}
function IsRSSUser(){if(pd_me==null)pd_me=new Object;if(!(pd_me.hasOwnProperty('IsRSSUser'))){if(location.href.indexOf('from=rss')>-1)SetCookie("FROMRSS","true");pd_me.IsRSSUser=(readCookie("FROMRSS")=="true");pd_me.AdsToHide="";}return pd_me.IsRSSUser;}
function AddAdToHide(AdFieldName){if(pd_me==null)pd_me=new Object;if(pd_me.hasOwnProperty('AdsToHide'))pd_me.AdsToHide=pd_me.AdsToHide+" "+AdFieldName;else pd_me.AdsToHide=AdFieldName;}
function HideAdFramesAndChangeTitles(){if(pd_me==null)return;if(pd_me.hasOwnProperty('AdsToHide')){var ads=pd_me.AdsToHide.split(' ');for(var i=0;i<ads.length;i++){HideAdFrame(ads[i]);}}var F=getObj('AdBrokerButtons_F');if(F!=null){var Has=false;for(var j=1;j<=10;j++){var adframe=getObj('AdBrokerButton'+j+'_F1');if(adframe!=null&&adframe.style.display!='none'){Has=true;break;}}if(!Has)F.style.display='none';}}
function bNoDBrokenButton(){var b=true;var adframe;for(var j=1;j<=4;j++){adframe=getObj('DColBrokerButton'+j+'_F1');if(adframe!=null&&adframe.style.display!='none'){b=false;break;}}return b;}
function HideAdFrame(AdName){if(pd_me!=null&&pd_me.hasOwnProperty('AdsToHide')&&pd_me.AdsToHide.indexOf(AdName)>-1){for(var j=1;j<=10;j++){var adframe=getObj(AdName+"_F"+j);if(adframe)adframe.style.display='none';else break;}if(AdName=='AdSponsor'){var F=getObj('AdSponsor_F');if(F!=null&&getObj('BreadCrumb_F').innerHTML.length<10)F.style.display='none';}}}
function ChangeSponsorAdTitle(){if(pd_me!=null){var AdTitle;if(pd_me.hasOwnProperty('SAdTitle')){AdTitle=getObj('SAdTitle');if(AdTitle)AdTitle.innerHTML=pd_me.SAdTitle;}if(pd_me.hasOwnProperty('STSAdTitle')){AdTitle=getObj('STSAdTitle');if(AdTitle)AdTitle.innerHTML=pd_me.STSAdTitle;}}}
function CB_Aff_DateTime(sDateTime){try{var aDTRaw=sDateTime.split(",");var aDateTime=aDTRaw[1].split(" ");var aTime=aDateTime[4].split(":");var sTime;if(aTime[0]>12){sTime=aTime[0]-12+":"+aTime[1]+" p.m.";}else{sTime=aTime[0]+":"+aTime[1]+" a.m.";}if(sTime.charAt(0)=="0"){sTime=sTime.substr(1);}if(!(sTime.indexOf("NaN")>-1)&&!(aDateTime[2].indexOf("NaN")>-1)&&!(aDateTime[1].indexOf("NaN")>-1)){document.write(sTime+", "+aDateTime[2]+". "+aDateTime[1]);}}catch(err){}}
function ssInit(ids,size,adp){var sList=Array(),temp=Array(),ss,setting=typeof(pd_me)!="undefined"?readCookie("SS"+pd_me.id):"";ids=ids.split(",");size=size.split("");if(setting!=""){var c;for(var i=setting.length-1;i>=0;i-=2){ss=new Object();c=setting.charCodeAt(i);ss.id=(setting.charCodeAt(i-1)<<6)+(c>>2);ss.size=c%4;sList.push(ss);temp[""+ss.id]=ss.size;}}for(var i=ids.length-1;i>=0;i--){if(temp[ids[i]]==null){ss=new Object();ss.id=ids[i];ss.size=size[i]-'0';sList.push(ss);}}var slice,ssHead,mBtn,sBtn,ads=getObj("AdBanner_F1"),n,k=0,ssWrap=getObj("ssWrap"),len=sList.length,cid,sParent;for(var i=0;i<len;i++){slice=sList.pop();if(i==adp){if(ads!=null&&ssWrap!=ads.parentNode){ads.parentNode.removeChild(ads);ssWrap.appendChild(ads);}}ss=getObj('ss_'+slice.id);if(!ss)continue;sParent=ss.parentNode;ss.i=slice.id;ss.s=slice.size;ss.className+=" pos"+(k%10+1);k++;if(i==len-1)ss.className+=" last";sParent.removeChild(ss);if(i<adp&&ads!=null&&ssWrap==ads.parentNode)ssWrap.insertBefore(ss,ads);else ssWrap.appendChild(ss);ssHead=ss.firstChild.childNodes;mBtn=ssHead[1].childNodes;mBtn[1].onclick=mBtn[2].onclick=ssMove;sBtn=ssHead[2].childNodes;if(sBtn.length>2){var bs,j,set=false;for(j=1;j<sBtn.length-1;j++){bs=parseInt(sBtn[j].firstChild.getAttribute("s"))-1;if(bs==slice.size){sBtn[j].className="btn current";ss.s=bs;set=true;}sBtn[j].onclick=ssSize;}if(!set){sBtn[j-1].className="btn current";ss.s=bs;}}ssShow(ss,ss.s,true);}}
I've seen people use platypus to 'fix' unwated js functions
https://addons.mozilla.org/en-US/firefox/addon/737
I wager other fixes can be accomplished with security policies
https://addons.mozilla.org/en-US/firefox/addon/1154
Yes, I really did search through those last two JS files

Posted: Tue Feb 19, 2008 8:13 am
by maybe
could something like this platypus userscript be adapted, pros?
http://userscripts.org/scripts/show/12229
Posted: Thu Sep 04, 2008 1:34 am
by streetwolf
FYI,
Ad Muncher under IE7 completely gets rid of the video ads and also the static ads. And the news video plays immediately.
When I use the ad blocker in IEPro all the ads are blocked but the video very often doesn't play. I have to click on another video and then click on the one I want. Still better than those video ads.
So my point being that removing the ads in an MSNBC video is possible. I wish someone would come up with something.
Posted: Thu Sep 04, 2008 2:14 am
by Ares2
streetwolf wrote:So my point being that removing the ads in an MSNBC video is possible. I wish someone would come up with something.
Probably something has changed there meanwhile (thread is more than 6 months old). Anyway the ads can be blocked easily (now?) with
Posted: Thu Sep 04, 2008 8:23 pm
by streetwolf
It looked like it worked the first time after I added the filter but now I still get the video ads.
I use the Easylist suite of filters. Is there another filter list that takes care of this?
Posted: Thu Sep 04, 2008 9:52 pm
by Ares2
OK, it doesn't work for me either, I just was too impatient.

The first ad occurs when you first visit the site, then it takes a certain amount of time before the next ad activates.
What seems to help to see no ads is to disable the EasyList whitelist
Code: Select all
@@/ads1.msn.com/ads/*.jpg$other,object-subrequest
but everytime there would have been a pre video ad, the real video doesn't start. You then have to click on another video and then again on the video you wanted to see to get it to work.
At least this is what I experience here, can you test if it works?
Posted: Thu Sep 04, 2008 11:10 pm
by streetwolf
I'm new to ABP so what exactly do I have to do to get this entry either removed or put on the whitelist?
ABP is somewhat different then what I am used to.
Posted: Thu Sep 04, 2008 11:20 pm
by Ares2
streetwolf wrote:I'm new to ABP so what exactly do I have to do to get this entry either removed or put on the whitelist?
Oh, sorry. The filter is part of EasyList's whitelist (containing elements that don't get blocked although another filter would have blocked them, this is necessary to get some video sites to work).
So what you want to do now is to disable this exception rule. Goto ABP preferences (Tools -> Adblock Plus), search for the entry and click the green dot next to it.
http://adblockplus.org/en/tips?tip=subs ... ove_filter
Posted: Thu Sep 04, 2008 11:25 pm
by rick752
I played with that the best I could a while back. I see nothing different there and the EasyList is the best I can get it.
Any attempt to change the whitelist or blacklists causes a problem (afaict).
The good thing is that an ad only plays for the FIRST clip ... any subsequent one plays immediately with no ad UNLESS you reload the video page. (That's probably why it is confusing you, Ares

)
Adblock Plus cannot pick the script apart there ... ABP is an "all or none" program when it comes to scripting.
Posted: Thu Sep 04, 2008 11:34 pm
by Ares2
rick752 wrote:The good thing is that an ad only plays for the FIRST clip ... any subsequent one plays immediately with no ad.
Not for me:
Ares2 wrote:I just was too impatient.

The first ad occurs when you first visit the site, then it takes a certain amount of time before the next ad activates.
rick752 wrote:the best I can get it.
If you know that you have to reload a video if it doesn't start (because of the blocked ad), it's better than watching the ad IMO.
Ares2 wrote:What seems to help to see no ads is to disable the EasyList whitelist
Code: Select all
@@/ads1.msn.com/ads/*.jpg$other,object-subrequest
but everytime there would have been a pre video ad, the real video doesn't start. You then have to click on another video and then again on the video you wanted to see to get it to work.
Posted: Thu Sep 04, 2008 11:50 pm
by streetwolf
Ares2 wrote:streetwolf wrote:I'm new to ABP so what exactly do I have to do to get this entry either removed or put on the whitelist?
Oh, sorry. The filter is part of EasyList's whitelist (containing elements that don't get blocked although another filter would have blocked them, this is necessary to get some video sites to work).
So what you want to do now is to disable this exception rule. Goto ABP preferences (Tools -> Adblock Plus), search for the entry and click the green dot next to it.
http://adblockplus.org/en/tips?tip=subs ... ove_filter
Did the trick. Now it behaves just like it does under IE7 using IEPro.
As I said AdMuncher blocks the ads completely and plays the video.
It's also true that once you play through the ad you won't get anymore for a little longer. Eventually the video ad comes back. I don't know what the criteria is that controls this.
Wonder if something like NoScript could help???
Posted: Fri Sep 05, 2008 12:01 am
by Ares2
rick752 wrote:The good thing is that an ad only plays for the FIRST clip ... any subsequent one plays immediately with no ad UNLESS you reload the video page. (That's probably why it is confusing you, Ares

)
As your edit was after my post: The ad does not reappear when you reload the page but time based. To make sure we talk about the same, a testcase: Choose "World news" in categories on the left, play the top video ("Snow blankets part of Kenya") and then just let it run.

You will see (hopefully

) that every 2-3 minutes there is a new pre-video ad (with the whitelist enabled of course).