Loading

Paste #pwkdef2b2

  1. // ==UserScript==
  2. // @name       My Fancy New Userscript
  3. // @namespace  http://use.i.E.your.homepage/
  4. // @version    0.1
  5. // @description  enter something useful
  6. // @match      http://movies.netflix.com/WiPlayer*
  7. // @copyright  2012+, You
  8. // ==/UserScript==
  9.  
  10. var player = document.getElementById('SLPlayer');
  11. var params = player.childNodes;
  12. var param;
  13. var found = false;
  14. for (var i = 0; i < params.length; i++) {
  15.     param = params[i];
  16.     if (param.name == 'initParams') {
  17.         found = true;
  18.         console.log('found initParams');
  19.         break;
  20.     }
  21. }
  22.  
  23. if (found) {
  24.     param.value += ',PlayerConfiguration.EnableHostedPlayerControl=true'; // player fails to start
  25.     param.value += ',PlayerConfiguration.EnableHostedPlayerControl.Enabled=true'; // player starts, assume ignored
  26.     param.value += ',EnableHostedPlayerControl=true'; // player fails to start
  27.     param.value += ',foo=bar'; // player starts, assume ignored
  28.     console.log(param);
  29.     // reload player
  30.     player.innerHTML = player.innerHTML;
  31. }

Comments