freecog.net

abcfamilyflashfix.user.js

Also see Install.

   1 // This script is obsolete, as ABC Family has fixed its site.  It will
   2 // remain here as an example of faking navigator.plugins.
   3 
   4 // ==UserScript==
   5 // @name           abcfamily.go.com Flash Player Detection Fix
   6 // @namespace      http://freecog.net/2006/
   7 // @description    Makes abcfamily.go.com think that Flash player 8 is installed.  This is useful since their detection code is completely idiotic--it chokes if you have version 9 installed--and they redirect you to a page telling you to install the plugin.  Turing off JavaScript doesn't work, since their site is so badly constructed as to be useless without it.  Note: an error is thrown by the "hbox" stat script--as best I can tell, it's just setting a cookie, so I'm not going to bother fixing it.
   8 // @include       *abcfamily.go.com*
   9 // ==/UserScript==
  10 
  11 (function(){
  12 
  13 unsafeWindow.navigator.__defineGetter__("plugins", function() {
  14     //GM_log("Fixing plugins.");
  15     return {
  16         'Shockwave Flash': {
  17             'description': '8.'
  18         },
  19         'length': 1,
  20         '1': {
  21             'name': 'Shockwave Flash',
  22             'description': 'flash 8.0'
  23         }
  24     };
  25 });
  26 
  27 })();