-
Notifications
You must be signed in to change notification settings - Fork 0
/
cck2.cfg
143 lines (130 loc) · 4.44 KB
/
cck2.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Autoconfig file written by CCK2
// SAMPLE FILE!!! CREATE AND EDIT YOUR OWN 'cck2.cfg' file. See lines 115-140 below.
var config = {
"cckVersion": "2.2.3.2",
"name": "Firefox-CCK",
"version": "1.0",
"homePage": "http://YOUR-DEFAULT-HOMEPAGE-HERE.COM",
"extension": {
"name": "Firefox-CCK"
},
//"lockHomePage": true,
"noWelcomePage": true,
"noUpgradePage": true,
//"noGetAddons": true,
//"disableAddonsManager": true,
//"noAddons": true,
"noAddonCompatibilityCheck": true,
//"disableSearchEngineInstall": true,
//"removeDefaultSearchEngines": true,
//"displayBookmarksToolbar": true,
"removeSmartBookmarks": true,
"removeDefaultBookmarks": true,
"dontCheckDefaultBrowser": true,
//"dontUseDownloadDir": true,
//"disablePrivateBrowsing": true,
//"disableFormFill": true,
//"dontRememberPasswords": true,
//"noMasterPassword": true,
//"disableSync": true,
//"disableCrashReporter": true,
//"disableTelemetry": true,
//"disableFirefoxHealthReportUpload": true,
//"disableFirefoxHealthReport": true,
//"disableFirefoxUpdates": true,
"dontShowRights": true,
//"removeSnippets": true,
"disableResetFirefox": true,
//"disablePDFjs": true,
//"disableWebApps": true,
"disableHello": true,
//"disableSharePage": true,
//"disableForget": true,
"disableHeartbeat": true,
//"disablePocket": true,
//"disableAboutSupport": true,
//"disableAboutProfiles": true,
"autoconfig": {
"disableProfileMigrator": true
},
"id": "Firefox-CCK",
"defaultSearchEngine": "Google" /* ,
"permissions": {
"mymathlab.com": {
"popup": 1,
"install": 1,
"cookie": 2,
"plugins": 2
},
"myitlab.com": {
"popup": 1
}
},
*/
/*
"bookmarks": {
"toolbar": [
{
"name": "bookmark-1",
"location": "http://www.bookmark-1.com"
},
{
"name": "bookmark-2",
"location": "https://my.bookmark-2.com"
},
{
"name": "bookmark-3",
"location": "https://www.bookmark-3.com"
}
]
},
*/
/*
"preferences": {
"browser.reader.detectedFirstArticle": {
"value": true
}
}
*/
};
var io = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var resource = io.getProtocolHandler("resource")
.QueryInterface(Components.interfaces.nsIResProtocolHandler);
var greDir = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("GreD", Components.interfaces.nsIFile);
var cck2ModuleDir = greDir.clone();
cck2ModuleDir.append("cck2");
cck2ModuleDir.append("modules");
var cck2Alias = io.newFileURI(cck2ModuleDir);
resource.setSubstitution("cck2", cck2Alias);
var configModuleDir = greDir.clone();
configModuleDir.append("cck2");
configModuleDir.append("resources");
var configAlias = io.newFileURI(configModuleDir);
resource.setSubstitution("cck2_wku", configAlias);
Components.utils.import("resource://cck2/CCK2.jsm");
// *** cck-import-gpo BEGIN *** ADD TO YOUR OWN 'cck2.cfg' FILE -- before calling CCK2.init() below
// load this to support 'Services.prompt.alert'
Components.utils.import("resource://gre/modules/Services.jsm");
// load custom cck-import-gpo javascript module
//Services.prompt.alert(null, "Firefox autoconfig DEBUG", "Before cck-import-gpo.jsm import...");
var cckimportgpo_ModuleDir = greDir.clone();
cckimportgpo_ModuleDir.append("cck-import-gpo");
var cckimportgpo_Alias = io.newFileURI(cckimportgpo_ModuleDir);
resource.setSubstitution("cck-import-gpo", cckimportgpo_Alias);
// call our external module to load GPO settings from the registry into our cck_config_GPO config variable
Components.utils.import("resource://cck-import-gpo/cck-import-gpo.jsm");
//Services.prompt.alert(null, "Firefox autoconfig DEBUG", "cck_config_GPO:\n" + JSON.stringify(cck_config_GPO));
// replace/append incoming GPO settings into cck's config variable
try {
for (var prop in cck_config_GPO) {
config[prop] = cck_config_GPO[prop];
}
} catch (ex) {
Services.prompt.alert(null, "Firefox autoconfig warning", "Failed replacing/appending CCK config data sourced from GPO settings.");
}
//Services.prompt.alert(null, "Firefox autoconfig DEBUG", "config after:\n" + JSON.stringify(config));
// *** cck-import-gpo END *** ADD TO YOUR OWN 'cck2.cfg' FILE -- before calling CCK2.init() below
CCK2.init(config, "ä"[0], "ä");