Moved FF add on out of project

This commit is contained in:
perroned 2015-11-05 07:51:11 -08:00
parent 0a07c8ff78
commit 16b3c3b01d
14 changed files with 0 additions and 222 deletions

View File

@ -1,33 +0,0 @@
# Enable Screen Capturing using [Firefox Extensions API](https://github.com/muaz-khan/Firefox-Extensions)
Enable screen capturing using Firefox (for https://www.webrtc-experiment.com demos only):
* [enable-screen-capturing.xpi](https://www.webrtc-experiment.com/store/firefox-extension/enable-screen-capturing.xpi)
To use in your own domains:
Modify `bootstrap.js` file, line 18:
```javascript
['yourDomain.com', 'www.yourDomain.com'].forEach(function(domain) {
if (values.indexOf(domain) === -1) {
values.push(domain);
addon_domains.push(domain);
}
});
```
And modify `install.rdf` for you extension information (name, URL, icon etc.)
## Credits
[Muaz Khan](https://github.com/muaz-khan):
1. Personal Webpage: http://www.muazkhan.com
2. Email: muazkh@gmail.com
3. Twitter: https://twitter.com/muazkh and https://twitter.com/WebRTCWeb
4. Google+: https://plus.google.com/+WebRTC-Experiment
## License
[Firefox-Extensions](https://github.com/muaz-khan/Firefox-Extensions) are released under [MIT licence](https://www.webrtc-experiment.com/licence/) . Copyright (c) [Muaz Khan](https://plus.google.com/+MuazKhan).

View File

@ -1,2 +0,0 @@
#BigBlueButton Deskshare for Firefox
Enables BigBlueButton WebRTC deskshare session through Firefox

View File

@ -1,46 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
* taken from: HenrikJoreteg/getScreenMedia/firefox-extension-sample
* original source: https://hg.mozilla.org/users/blassey_mozilla.com/screenshare-whitelist/
*/
var addon_domains = []; // list of domains the addon added
var allowed_domains_pref = 'media.getusermedia.screensharing.allowed_domains';
var enable_screensharing_pref = 'media.getusermedia.screensharing.enabled';
function startup(data, reason) {
if (reason === APP_STARTUP) {
return;
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
var values = prefs.getCharPref(allowed_domains_pref).split(',');
['*'].forEach(function(domain) {
if (values.indexOf(domain) === -1) {
values.push(domain);
addon_domains.push(domain);
}
});
if(prefs.getBoolPref(enable_screensharing_pref) == false) {
prefs.setBoolPref(enable_screensharing_pref, 1);
}
prefs.setCharPref(allowed_domains_pref, values.join(','));
}
function shutdown(data, reason) {
if (reason === APP_SHUTDOWN) {
return;
}
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var values = prefs.getCharPref(allowed_domains_pref).split(',');
values = values.filter(function(value) {
return addon_domains.indexOf(value) === -1;
});
prefs.setCharPref(allowed_domains_pref, values.join(','));
}
function install(data, reason) {}
function uninstall(data, reason) {}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

View File

@ -1,9 +0,0 @@
var self = require('sdk/self');
// a dummy function, to show how tests work.
// to see how to test this function, look at test/test-index.js
function dummy(text, callback) {
callback(text);
}
exports.dummy = dummy;

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>perroned</em:id>
<em:type>2</em:type>
<em:name>BBB Screen Capturing in Firefox</em:name>
<em:description>BBB Firefox extension to enable screen capturing</em:description>
<em:version>1.0</em:version>
<em:bootstrap>true</em:bootstrap>
<em:creator>perroned</em:creator>
<em:homepageURL>http://bigbluebutton.org/</em:homepageURL>
<em:iconURL>icon.png</em:iconURL>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>33.0</em:minVersion>
<em:maxVersion>100000.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>

View File

@ -1,12 +0,0 @@
{
"title": "BigBlueButton Deskshare for Firefox",
"name": "perroned",
"version": "0.0.1",
"description": "Enables BigBlueButton WebRTC deskshare session through Firefox",
"main": "boostrap.js",
"author": "perroned",
"engines": {
"firefox": ">=38.0a1"
},
"license": "MIT"
}

View File

@ -1,19 +0,0 @@
var main = require("../");
exports["test main"] = function(assert) {
assert.pass("Unit test running!");
};
exports["test main async"] = function(assert, done) {
assert.pass("async Unit test running!");
done();
};
exports["test dummy"] = function(assert, done) {
main.dummy("foo", function(text) {
assert.ok((text === "foo"), "Is the text actually 'foo'");
done();
});
};
require("sdk/test").run(exports);

View File

@ -1,46 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
* taken from: HenrikJoreteg/getScreenMedia/firefox-extension-sample
* original source: https://hg.mozilla.org/users/blassey_mozilla.com/screenshare-whitelist/
*/
var addon_domains = []; // list of domains the addon added
var allowed_domains_pref = 'media.getusermedia.screensharing.allowed_domains';
var enable_screensharing_pref = 'media.getusermedia.screensharing.enabled';
function startup(data, reason) {
if (reason === APP_STARTUP) {
return;
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
var values = prefs.getCharPref(allowed_domains_pref).split(',');
['localhost', '*', 'https://192.168.126.129/'].forEach(function(domain) {
if (values.indexOf(domain) === -1) {
values.push(domain);
addon_domains.push(domain);
}
});
if(prefs.getBoolPref(enable_screensharing_pref) == false) {
prefs.setBoolPref(enable_screensharing_pref, 1);
}
prefs.setCharPref(allowed_domains_pref, values.join(','));
}
function shutdown(data, reason) {
if (reason === APP_SHUTDOWN) {
return;
}
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var values = prefs.getCharPref(allowed_domains_pref).split(',');
values = values.filter(function(value) {
return addon_domains.indexOf(value) === -1;
});
prefs.setCharPref(allowed_domains_pref, values.join(','));
}
function install(data, reason) {}
function uninstall(data, reason) {}

View File

@ -1,13 +0,0 @@
{
"title": "fdsfg",
"name": "gdfg",
"version": "0.0.1",
"description": "dfgfdgd",
"main": "index.js",
"author": "gfdg",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1"
},
"license": "MIT"
}

View File

@ -1,19 +0,0 @@
var main = require("../");
exports["test main"] = function(assert) {
assert.pass("Unit test running!");
};
exports["test main async"] = function(assert, done) {
assert.pass("async Unit test running!");
done();
};
exports["test dummy"] = function(assert, done) {
main.dummy("foo", function(text) {
assert.ok((text === "foo"), "Is the text actually 'foo'");
done();
});
};
require("sdk/test").run(exports);