Telegram Web, preconfigured for usage in I2P.
http://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.4 KiB
86 lines
2.4 KiB
11 years ago
|
var fs = require('fs');
|
||
|
var spawn = require('child_process').spawn;
|
||
|
|
||
|
|
||
|
var PREFS =
|
||
|
'user_pref("browser.shell.checkDefaultBrowser", false);\n' +
|
||
|
'user_pref("browser.bookmarks.restore_default_bookmarks", false);\n' +
|
||
|
<<<<<<< HEAD
|
||
|
'user_pref("dom.disable_open_during_load", false);\n';
|
||
|
=======
|
||
|
'user_pref("dom.max_script_run_time", 0);\n';
|
||
|
>>>>>>> disable "script not responding" dialog on test run
|
||
|
|
||
|
|
||
|
// https://developer.mozilla.org/en-US/docs/Command_Line_Options
|
||
|
var FirefoxBrowser = function(id, baseBrowserDecorator, logger) {
|
||
|
baseBrowserDecorator(this);
|
||
|
|
||
|
var log = logger.create('launcher');
|
||
|
|
||
|
this._start = function(url) {
|
||
|
var self = this;
|
||
|
var command = this._getCommand();
|
||
|
|
||
|
fs.createWriteStream(self._tempDir + '/prefs.js', {flags: 'a'}).write(PREFS);
|
||
|
self._execCommand(command, [url, '-profile', self._tempDir, '-no-remote']);
|
||
|
};
|
||
|
};
|
||
|
|
||
|
|
||
|
FirefoxBrowser.prototype = {
|
||
|
name: 'Firefox',
|
||
|
|
||
|
DEFAULT_CMD: {
|
||
|
linux: 'firefox',
|
||
|
darwin: '/Applications/Firefox.app/Contents/MacOS/firefox-bin',
|
||
|
win32: process.env.ProgramFiles + '\\Mozilla Firefox\\firefox.exe'
|
||
|
},
|
||
|
ENV_CMD: 'FIREFOX_BIN'
|
||
|
};
|
||
|
|
||
|
FirefoxBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger'];
|
||
|
|
||
|
|
||
|
var FirefoxAuroraBrowser = function(id, baseBrowserDecorator, logger) {
|
||
|
FirefoxBrowser.call(this, id, baseBrowserDecorator, logger);
|
||
|
};
|
||
|
|
||
|
FirefoxAuroraBrowser.prototype = {
|
||
|
name: 'FirefoxAurora',
|
||
|
DEFAULT_CMD: {
|
||
|
linux: 'firefox',
|
||
|
darwin: '/Applications/FirefoxAurora.app/Contents/MacOS/firefox-bin',
|
||
|
win32: process.env.ProgramFiles + '\\Aurora\\firefox.exe'
|
||
|
},
|
||
|
ENV_CMD: 'FIREFOX_AURORA_BIN'
|
||
|
};
|
||
|
|
||
|
FirefoxAuroraBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger'];
|
||
|
|
||
|
|
||
|
var FirefoxNightlyBrowser = function(id, baseBrowserDecorator, logger) {
|
||
|
FirefoxBrowser.call(this, id, baseBrowserDecorator, logger);
|
||
|
};
|
||
|
|
||
|
FirefoxNightlyBrowser.prototype = {
|
||
|
name: 'FirefoxNightly',
|
||
|
|
||
|
DEFAULT_CMD: {
|
||
|
linux: 'firefox',
|
||
|
darwin: '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin',
|
||
|
win32: process.env.ProgramFiles + '\\Nightly\\firefox.exe'
|
||
|
},
|
||
|
ENV_CMD: 'FIREFOX_NIGHTLY_BIN'
|
||
|
};
|
||
|
|
||
|
FirefoxNightlyBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger'];
|
||
|
|
||
|
|
||
|
// PUBLISH DI MODULE
|
||
|
module.exports = {
|
||
|
'launcher:Firefox': ['type', FirefoxBrowser],
|
||
|
'launcher:FirefoxAurora': ['type', FirefoxAuroraBrowser],
|
||
|
'launcher:FirefoxNightly': ['type', FirefoxNightlyBrowser]
|
||
|
};
|