Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rupN original/defaults/preferences/prefs.js new/defaults/preferences/prefs.js
- --- original/defaults/preferences/prefs.js 2013-08-20 18:59:42.000000000 +0200
- +++ new/defaults/preferences/prefs.js 2013-11-08 06:37:12.131857079 +0100
- @@ -1,2 +1,3 @@
- pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.html5", true);
- pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.hd", false);
- +pref("extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.feather", false);
- diff -rupN original/harness-options.json new/harness-options.json
- --- original/harness-options.json 2013-08-20 18:59:42.000000000 +0200
- +++ new/harness-options.json 2013-11-08 06:35:55.579855529 +0100
- @@ -58,9 +58,15 @@
- "title": "Prefer HD Quality",
- "type": "bool",
- "value": false
- + },
- + {
- + "name": "feather",
- + "title": "Prefer Feather Mode ",
- + "type": "bool",
- + "value": false
- }
- ],
- "sdkVersion": "1.14",
- "staticArgs": {},
- "verbose": false
- -}
- \ No newline at end of file
- +}
- diff -rupN original/options.xul new/options.xul
- --- original/options.xul 2013-08-20 18:59:42.000000000 +0200
- +++ new/options.xul 2013-11-08 06:36:29.451856215 +0100
- @@ -2,4 +2,5 @@
- <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.html5" pref-name="html5" title="Prefer HTML5 Player" type="bool"/>
- <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.hd" pref-name="hd" title="Prefer HD Quality" type="bool"/>
- + <setting data-jetpack-id="jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack" pref="extensions.jid0-MXvUXM1npF7yTcY3bpZVht72AR4@jetpack.feather" pref-name="feather" title="Prefer Feather Mode" type="bool"/>
- </vbox>
- diff -rupN original/resources/youtube-html5-video/data/inline.js new/resources/youtube-html5-video/data/inline.js
- --- original/resources/youtube-html5-video/data/inline.js 2013-08-20 17:42:48.000000000 +0200
- +++ new/resources/youtube-html5-video/data/inline.js 2013-11-08 06:55:51.207879746 +0100
- @@ -1,5 +1,5 @@
- // function that sets the params
- -self.port.on('setParam', function(HTML5_PARAM, HD_PARAM) {
- +self.port.on('setParam', function(HTML5_PARAM, HD_PARAM, FEATHER_PARAM) {
- let url = window.location.href;
- // use only the part before the first #
- let parts = url.split('#');
- @@ -15,6 +15,10 @@ self.port.on('setParam', function(HTML5_
- if(HD_PARAM && !/(\?|&)hd=1/.test(parts[0])) {
- parts[0] = parts[0] + '&hd=1';
- }
- + // add feather parameter
- + if(FEATHER_PARAM && !/(\?|&)feather=1/.test(parts[0])) {
- + parts[0] = parts[0] + '&feather=1';
- + }
- url = parts.join('#');
- @@ -23,4 +27,4 @@ self.port.on('setParam', function(HTML5_
- window.location.replace(url);
- }
- }
- -});
- \ No newline at end of file
- +});
- diff -rupN original/resources/youtube-html5-video/lib/main.js new/resources/youtube-html5-video/lib/main.js
- --- original/resources/youtube-html5-video/lib/main.js 2013-08-20 17:42:22.000000000 +0200
- +++ new/resources/youtube-html5-video/lib/main.js 2013-11-08 06:39:57.155860422 +0100
- @@ -6,12 +6,14 @@ exports.main = function() {
- // get preferences, should not be made during each page load
- let HTML5_PARAM = require('sdk/simple-prefs').prefs['html5'];
- let HD_PARAM = require('sdk/simple-prefs').prefs['hd'];
- - let ANY_PARAM = HTML5_PARAM || HD_PARAM;
- + let FEATHER_PARAM = require('sdk/simple-prefs').prefs['feather'];
- + let ANY_PARAM = HTML5_PARAM || HD_PARAM || FEATHER_PARAM;
- // update preferences, if necessary
- require('sdk/simple-prefs').on('', function() {
- HTML5_PARAM = require('sdk/simple-prefs').prefs['html5'];
- HD_PARAM = require('sdk/simple-prefs').prefs['hd'];
- + FEATHER_PARAM = require('sdk/simple-prefs').prefs['feather'];
- ANY_PARAM = HTML5_PARAM || HD_PARAM;
- });
- @@ -22,10 +24,10 @@ exports.main = function() {
- contentScriptFile: data.url('inline.js'),
- onAttach: function(worker) {
- if(ANY_PARAM && worker.tab.url == worker.url) {
- - worker.port.emit('setParam', HTML5_PARAM, HD_PARAM);
- + worker.port.emit('setParam', HTML5_PARAM, HD_PARAM, FEATHER_PARAM);
- }
- worker.destroy();
- }
- });
- -};
- \ No newline at end of file
- +};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement