daily pastebin goal
45%
SHARE
TWEET

youtube_html5_video

a guest Nov 7th, 2013 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -rupN original/defaults/preferences/prefs.js new/defaults/preferences/prefs.js
  2. --- original/defaults/preferences/prefs.js      2013-08-20 18:59:42.000000000 +0200
  3. +++ new/defaults/preferences/prefs.js   2013-11-08 06:37:12.131857079 +0100
  4. @@ -1,2 +1,3 @@
  5.  pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.html5", true);
  6.  pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.hd", false);
  7. +pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.feather", false);
  8. diff -rupN original/harness-options.json new/harness-options.json
  9. --- original/harness-options.json       2013-08-20 18:59:42.000000000 +0200
  10. +++ new/harness-options.json    2013-11-08 06:35:55.579855529 +0100
  11. @@ -58,9 +58,15 @@
  12.     "title": "Prefer HD Quality",
  13.     "type": "bool",
  14.     "value": false
  15. +  },
  16. +  {
  17. +   "name": "feather",
  18. +   "title": "Prefer Feather Mode ",
  19. +   "type": "bool",
  20. +   "value": false
  21.    }
  22.   ],
  23.   "sdkVersion": "1.14",
  24.   "staticArgs": {},
  25.   "verbose": false
  26. -}
  27. \ No newline at end of file
  28. +}
  29. diff -rupN original/options.xul new/options.xul
  30. --- original/options.xul        2013-08-20 18:59:42.000000000 +0200
  31. +++ new/options.xul     2013-11-08 06:36:29.451856215 +0100
  32. @@ -2,4 +2,5 @@
  33.  <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  34.    <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.html5" pref-name="html5" title="Prefer HTML5 Player" type="bool"/>
  35.    <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.hd" pref-name="hd" title="Prefer HD Quality" type="bool"/>
  36. +  <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.feather" pref-name="feather" title="Prefer Feather Mode" type="bool"/>
  37.  </vbox>
  38. diff -rupN original/resources/youtube-html5-video/data/inline.js new/resources/youtube-html5-video/data/inline.js
  39. --- original/resources/youtube-html5-video/data/inline.js       2013-08-20 17:42:48.000000000 +0200
  40. +++ new/resources/youtube-html5-video/data/inline.js    2013-11-08 06:55:51.207879746 +0100
  41. @@ -1,5 +1,5 @@
  42.  // function that sets the params
  43. -self.port.on('setParam', function(HTML5_PARAM, HD_PARAM) {
  44. +self.port.on('setParam', function(HTML5_PARAM, HD_PARAM, FEATHER_PARAM) {
  45.      let url = window.location.href;
  46.      // use only the part before the first #
  47.      let parts = url.split('#');
  48. @@ -15,6 +15,10 @@ self.port.on('setParam', function(HTML5_
  49.          if(HD_PARAM && !/(\?|&)hd=1/.test(parts[0])) {
  50.              parts[0] = parts[0] + '&hd=1';
  51.          }
  52. +        // add feather parameter
  53. +        if(FEATHER_PARAM && !/(\?|&)feather=1/.test(parts[0])) {
  54. +            parts[0] = parts[0] + '&feather=1';
  55. +        }
  56.          
  57.          url = parts.join('#');
  58.          
  59. @@ -23,4 +27,4 @@ self.port.on('setParam', function(HTML5_
  60.              window.location.replace(url);
  61.          }
  62.      }
  63. -});
  64. \ No newline at end of file
  65. +});
  66. diff -rupN original/resources/youtube-html5-video/lib/main.js new/resources/youtube-html5-video/lib/main.js
  67. --- original/resources/youtube-html5-video/lib/main.js  2013-08-20 17:42:22.000000000 +0200
  68. +++ new/resources/youtube-html5-video/lib/main.js       2013-11-08 06:39:57.155860422 +0100
  69. @@ -6,12 +6,14 @@ exports.main = function() {
  70.      // get preferences, should not be made during each page load
  71.      let HTML5_PARAM = require('sdk/simple-prefs').prefs['html5'];
  72.      let HD_PARAM = require('sdk/simple-prefs').prefs['hd'];
  73. -    let ANY_PARAM = HTML5_PARAM || HD_PARAM;
  74. +    let FEATHER_PARAM = require('sdk/simple-prefs').prefs['feather'];
  75. +    let ANY_PARAM = HTML5_PARAM || HD_PARAM || FEATHER_PARAM;
  76.  
  77.      // update preferences, if necessary
  78.      require('sdk/simple-prefs').on('', function() {
  79.          HTML5_PARAM = require('sdk/simple-prefs').prefs['html5'];
  80.          HD_PARAM = require('sdk/simple-prefs').prefs['hd'];
  81. +        FEATHER_PARAM = require('sdk/simple-prefs').prefs['feather'];
  82.          ANY_PARAM = HTML5_PARAM || HD_PARAM;
  83.      });
  84.  
  85. @@ -22,10 +24,10 @@ exports.main = function() {
  86.          contentScriptFile: data.url('inline.js'),
  87.          onAttach: function(worker) {
  88.              if(ANY_PARAM && worker.tab.url == worker.url) {
  89. -                worker.port.emit('setParam', HTML5_PARAM, HD_PARAM);
  90. +                worker.port.emit('setParam', HTML5_PARAM, HD_PARAM, FEATHER_PARAM);
  91.              }
  92.              
  93.              worker.destroy();
  94.          }
  95.      });
  96. -};
  97. \ No newline at end of file
  98. +};
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top