Skip navigation.

Prepare!

Lee Harvey's Zombie Hit Parade

Posts tagged with "football"

UserJS to fix NFL.com RealPlayer video

, , , ...

For whatever reason, Opera disallows calling the DoStop(), DoPlay(), etc methods of the RealPlayer plug-in on nfl.com -- perhaps for security reasons, since the script which injects the tag is located on images.nfl.com, but the homepage is on www.nfl.com.

Anyhow, this latest script provides a work-around by rewriting the HTML inside the tag hosting the RealPlayer plug-in. In essence, it simply sets the autoplay attribute to true, which allows the video to play when users click a video link.

Download/view the nfl.js script
if (document.domain.match(/^(www\.|images\.)?nfl\.com$/)) {
  window.opera.defineMagicFunction("goMovie",
    function (a,b,selection) {
      var videoplayer = document.getElementById("videoplayer");
      if (!videoplayer) return;
      videoplayer.innerHTML = '<PARAM name="autostart" value="true"/> \
        <PARAM name="controls" value="imagewindow"/> \
        <PARAM name="src" value="' + selection + '"/> \
        <PARAM name="console" value="cons"/> \
        <PARAM name="nologo" value="true"/> \
        <EMBED name="videoplayer" type="audio/x-pn-realaudio-plugin" width="240" height="180" nologo="true" src="' + selection + '" controls="imagewindow" autostart="true" console="cons"/>';
    });
}

To learn how to install this User JavaScript, visit UserJS.org

Enjoy.

UserJS to fix Yahoo! Football Play by Play

, , , ...

Yes, Yahoo! stinks when it comes to web coding. Simply right-click any of their pages in Opera, select "Validate", and then watch the markup errors pile-up.

Anyhow, this latest script fixes their NFL and NCAA football play by play display in Opera.

For example:

yahooNFL.js
if (document.domain.match(/^sports\.yahoo\.com$/) && 
  window.location.href.match(/&page=plays/)) {
  document.addEventListener("load",
    function() {
      var yspMainContent = document.getElementById("yspMainContent");
      if (!yspMainContent) return;
      yspMainContent.innerHTML = yspMainContent.innerHTML.replace(/\<thead\>/gi, '<table width="560" border="0" cellpadding="0" cellspacing="0"><thead>');
      yspMainContent.innerHTML = yspMainContent.innerHTML.replace(/\<\/tbody\>/gi, '</tbody></table>');
      }, 0);
}

To learn how to install this User JavaScript, visit UserJS.org

Enjoy.