You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check if browser support Promise version of Notification Permissions
132
+
functioncheckNotificationPromise(){
133
+
try{
134
+
Notification.requestPermission().then();
135
+
}catch(e){
136
+
returnfalse;
137
+
}
138
+
returntrue;
139
+
}
140
+
141
+
// Check if the browser supports notifications and which type
142
+
if(!('Notification'inwindow)){
143
+
console.log("This browser does not support notifications.");
144
+
}
145
+
else{
146
+
if(checkNotificationPromise()){
147
+
Notification.requestPermission().then();
148
+
}
149
+
else{
150
+
Notification.requestPermission();
151
+
}
152
+
}
153
+
}
154
+
}
155
+
117
156
CM.ConfigData.BotBar={label: ['Bottom Bar OFF','Bottom Bar ON'],desc: 'Building Information',toggle: true,func: function(){CM.Disp.ToggleBotBar();}};
118
157
CM.ConfigData.TimerBar={label: ['Timer Bar OFF','Timer Bar ON'],desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy',toggle: true,func: function(){CM.Disp.ToggleTimerBar();}};
119
158
CM.ConfigData.TimerBarPos={label: ['Timer Bar Position (Top Left)','Timer Bar Position (Bottom)'],desc: 'Placement of the Timer Bar',toggle: false,func: function(){CM.Disp.ToggleTimerBarPos();}};
CM.ConfigData.BulkBuildColor={label: ['Bulk Building Colors (Single Buildings Color)','Bulk Building Colors (Calculated Color)'],desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color',toggle: false,func: function(){CM.Disp.UpdateBuildings();}};
160
+
CM.ConfigData.BulkBuildColor={label: ['Bulk Building Colors (Single Building Color)','Bulk Building Colors (Calculated Bulk Color)'],desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color',toggle: false,func: function(){CM.Disp.UpdateBuildings();}};
161
+
CM.ConfigData.ColorPPBulkMode={label: ['Color of PP (Compared to Single)','Color of PP (Compared to Bulk)'],desc: 'Color PP-values based on comparison with single purchase or with selected bulk-buy mode',toggle: false};
122
162
CM.ConfigData.UpBarColor={label: ['Upgrade Colors/Bar OFF','Upgrade Colors with Bar ON','Upgrade Colors without Bar ON'],desc: 'Color code upgrades and optionally add a counter bar',toggle: false,func: function(){CM.Disp.ToggleUpBarColor();}};
123
163
CM.ConfigData.Colors={
124
164
desc: {
@@ -139,7 +179,8 @@ CM.ConfigData.CalcWrink = {label: ['Calculate with Wrinklers OFF', 'Calculate wi
139
179
CM.ConfigData.CPSMode={label: ['Current Cookies Per Second','Average Cookies Per Second'],desc: 'Calculate times using current Cookies Per Second or average Cookies Per Second',toggle: false};
140
180
CM.ConfigData.AvgCPSHist={label: ['Average CPS for past 10s','Average CPS for past 15s','Average CPS for past 30s','Average CPS for past 1m','Average CPS for past 5m','Average CPS for past 10m','Average CPS for past 15m','Average CPS for past 30m'],desc: 'How much time average Cookies Per Second should consider',toggle: false};
141
181
CM.ConfigData.AvgClicksHist={label: ['Average Cookie Clicks for past 1s','Average Cookie Clicks for past 5s','Average Cookie Clicks for past 10s','Average Cookie Clicks for past 15s','Average Cookie Clicks for past 30s'],desc: 'How much time average Cookie Clicks should consider',toggle: false};
142
-
CM.ConfigData.ToolWarnCautBon={label: ['Calculate Tooltip Warning/Caution With Bonus CPS OFF','Calculate Tooltip Warning/Caution With Bonus CPS ON'],desc: 'Calculate the warning/caution with or without the bonus CPS you get from buying',toggle: true};
182
+
CM.ConfigData.ToolWarnBon={label: ['Calculate Tooltip Warning With Bonus CPS OFF','Calculate Tooltip Warning With Bonus CPS ON'],desc: 'Calculate the warning with or without the bonus CPS you get from buying',toggle: true};
183
+
CM.ConfigData.GCNotification={label: ['Golden Cookie Notification OFF','Golden Cookie Notification ON'],desc: 'Create a notification when Golden Cookie spawns',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.GCNotification);}};
143
184
CM.ConfigData.GCFlash={label: ['Golden Cookie Flash OFF','Golden Cookie Flash ON'],desc: 'Flash screen on Golden Cookie',toggle: true};
144
185
CM.ConfigData.GCSound={label: ['Golden Cookie Sound OFF','Golden Cookie Sound ON'],desc: 'Play a sound on Golden Cookie',toggle: true};
145
186
CM.ConfigData.GCVolume={label: [],desc: 'Volume of the Golden Cookie sound'};
@@ -149,13 +190,15 @@ for (var i = 0; i < 101; i++) {
149
190
CM.ConfigData.GCSoundURL={label: 'Golden Cookie Sound URL:',desc: 'URL of the sound to be played when a Golden Cookie spawns'};
150
191
CM.ConfigData.GCTimer={label: ['Golden Cookie Timer OFF','Golden Cookie Timer ON'],desc: 'A timer on the Golden Cookie when it has been spawned',toggle: true,func: function(){CM.Disp.ToggleGCTimer();}};
CM.ConfigData.FortuneNotification={label: ['Fortune Cookie Notification OFF','Fortune Cookie Notification ON'],desc: 'Create a notification when Fortune Cookie is on the Ticker',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.FortuneNotification);}};
CM.ConfigData.FortuneSound={label: ['Fortune Cookie Sound OFF','Fortune Cookie Sound ON'],desc: 'Play a sound on Fortune Cookie',toggle: true};
154
196
CM.ConfigData.FortuneVolume={label: [],desc: 'Volume of the Fortune Cookie sound'};
155
197
for(vari=0;i<101;i++){
156
198
CM.ConfigData.FortuneVolume.label[i]=i+'%';
157
199
}
158
200
CM.ConfigData.FortuneSoundURL={label: 'Fortune Cookie Sound URL:',desc: 'URL of the sound to be played when the Ticker has a Fortune Cookie'};
201
+
CM.ConfigData.SeaNotification={label: ['Season Special Notification OFF','Season Special Notification ON'],desc: 'Create a notification on Season Popup',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.SeaNotification);}};
159
202
CM.ConfigData.SeaFlash={label: ['Season Special Flash OFF','Season Special Flash ON'],desc: 'Flash screen on Season Popup',toggle: true};
160
203
CM.ConfigData.SeaSound={label: ['Season Special Sound OFF','Season Special Sound ON'],desc: 'Play a sound on Season Popup',toggle: true};
161
204
CM.ConfigData.SeaVolume={label: [],desc: 'Volume of the Season Special sound'};
@@ -170,15 +213,41 @@ for (var i = 0; i < 101; i++) {
170
213
CM.ConfigData.GardVolume.label[i]=i+'%';
171
214
}
172
215
CM.ConfigData.GardSoundURL={label: 'Garden Tick Sound URL:',desc: 'URL of the sound to be played when the garden ticks'};
216
+
CM.ConfigData.MagicNotification={label: ['Magic Max Notification OFF','Magic Max Notification ON'],desc: 'Create a notification when magic reaches maximum',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.MagicNotification);}};
217
+
CM.ConfigData.MagicFlash={label: ['Magic Max Flash OFF','Magic Max Flash ON'],desc: 'Flash screen when magic reaches maximum',toggle: true};
218
+
CM.ConfigData.MagicSound={label: ['Magic Max Sound OFF','Magic Max Sound ON'],desc: 'Play a sound when magic reaches maximum',toggle: true};
219
+
CM.ConfigData.MagicVolume={label: [],desc: 'Volume of the Max Magic sound'};
220
+
for(vari=0;i<101;i++){
221
+
CM.ConfigData.MagicVolume.label[i]=i+'%';
222
+
}
223
+
CM.ConfigData.MagicSoundURL={label: 'Magic Max Sound URL:',desc: 'URL of the sound to be played when magic reaches maxium'};
224
+
CM.ConfigData.WrinklerNotification={label: ['Wrinkler Notification OFF','Wrinkler Notification ON'],desc: 'Create a notification when a Wrinkler appears',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.WrinklerNotification);}};
225
+
CM.ConfigData.WrinklerFlash={label: ['Wrinkler Flash OFF','Wrinkler Flash ON'],desc: 'Flash screen when a Wrinkler appears',toggle: true};
226
+
CM.ConfigData.WrinklerSound={label: ['Wrinkler Sound OFF','Wrinkler Sound ON'],desc: 'Play a sound when a Wrinkler appears',toggle: true};
227
+
CM.ConfigData.WrinklerVolume={label: [],desc: 'Volume of the Wrinkler sound'};
228
+
for(vari=0;i<101;i++){
229
+
CM.ConfigData.WrinklerVolume.label[i]=i+'%';
230
+
}
231
+
CM.ConfigData.WrinklerSoundURL={label: 'Wrinkler Sound URL:',desc: 'URL of the sound to be played when a Wrinkler appears'};
232
+
CM.ConfigData.WrinklerMaxNotification={label: ['Wrinkler Max Notification OFF','Wrinkler Max Notification ON'],desc: 'Create a notification when the maximum amount of Wrinklers has appeared',toggle: true,func: function(){CM.CheckNotificationPermissions(CM.Config.WrinklerMaxNotification);}};
233
+
CM.ConfigData.WrinklerMaxFlash={label: ['Wrinkler Max Flash OFF','Wrinkler Max Flash ON'],desc: 'Flash screen when the maximum amount of Wrinklers has appeared',toggle: true};
234
+
CM.ConfigData.WrinklerMaxSound={label: ['Wrinkler Max Sound OFF','Wrinkler Max Sound ON'],desc: 'Play a sound when the maximum amount of Wrinklers has appeared',toggle: true};
235
+
CM.ConfigData.WrinklerMaxVolume={label: [],desc: 'Volume of the Wrinkler Max sound'};
236
+
for(vari=0;i<101;i++){
237
+
CM.ConfigData.WrinklerMaxVolume.label[i]=i+'%';
238
+
}
239
+
CM.ConfigData.WrinklerMaxSoundURL={label: 'Wrinkler Max Sound URL:',desc: 'URL of the sound to be played when the maximum amount of Wrinklers has appeared'};
173
240
CM.ConfigData.Title={label: ['Title OFF','Title ON','Title Pinned Tab Highlight'],desc: 'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns',toggle: true};
174
241
CM.ConfigData.TooltipBuildUp={label: ['Buildings/Upgrades Tooltip Information OFF','Buildings/Upgrades Tooltip Information ON'],desc: 'Extra information in tooltip for buildings/upgrades',toggle: true};
175
242
CM.ConfigData.TooltipAmor={label: ['Buildings Tooltip Amortization Information OFF','Buildings Tooltip Amortization Information ON'],desc: 'Add amortization information to buildings tooltip',toggle: true};
176
-
CM.ConfigData.ToolWarnCaut={label: ['Tooltip Warning/Caution OFF','Tooltip Warning/Caution ON'],desc: 'A warning/caution when buying if it will put the bank under the amount needed for max "Lucky!"/"Lucky!" (Frenzy) rewards',toggle: true,func: function(){CM.Disp.ToggleToolWarnCaut();}};
177
-
CM.ConfigData.ToolWarnCautPos={label: ['Tooltip Warning/Caution Position (Left)','Tooltip Warning/Caution Position (Bottom)'],desc: 'Placement of the warning/caution boxes',toggle: false,func: function(){CM.Disp.ToggleToolWarnCautPos();}};
243
+
CM.ConfigData.ToolWarnLucky={label: ['Tooltip Lucky Warning OFF','Tooltip Lucky Warning ON'],desc: 'A warning when buying if it will put the bank under the amount needed for max "Lucky!"/"Lucky!" (Frenzy) rewards',toggle: true};
244
+
CM.ConfigData.ToolWarnConjure={label: ['Tooltip Conjure Warning OFF','Tooltip Conjure Warning ON'],desc: 'A warning when buying if it will put the bank under the amount needed for max "Conjure Baked Goods" rewards',toggle: true};
245
+
CM.ConfigData.ToolWarnPos={label: ['Tooltip Warning Position (Left)','Tooltip Warning Position (Bottom)'],desc: 'Placement of the warning boxes',toggle: false,func: function(){CM.Disp.ToggleToolWarnPos();}};
178
246
CM.ConfigData.TooltipGrim={label: ['Grimoire Tooltip Information OFF','Grimoire Tooltip Information ON'],desc: 'Extra information in tooltip for grimoire',toggle: true};
179
247
CM.ConfigData.ToolWrink={label: ['Wrinkler Tooltip OFF','Wrinkler Tooltip ON'],desc: 'Shows the amount of cookies a wrinkler will give when popping it',toggle: true};
180
248
CM.ConfigData.TooltipLump={label: ['Sugar Lump Tooltip OFF','Sugar Lump Tooltip ON'],desc: 'Shows the current Sugar Lump type in Sugar lump tooltip.',toggle: true};
CM.ConfigData.MissingUpgrades={label: ['Missing Upgrades OFF','Missing Upgrades ON'],desc: 'Shows Missing upgrades in Stats Menu. This feature can be laggy for users with a low amount of unlocked achievements.',toggle: true};
182
251
CM.ConfigData.UpStats={label: ['Statistics Update Rate (Default)','Statistics Update Rate (1s)'],desc: 'Default Game rate is once every 5 seconds',toggle: false};
183
252
CM.ConfigData.TimeFormat={label: ['Time XXd, XXh, XXm, XXs','Time XX:XX:XX:XX:XX'],desc: 'Change the time format',toggle: false};
184
253
CM.ConfigData.SayTime={label: ['Format Time OFF','Format Time ON'],desc: 'Change how time is displayed in statistics',toggle: true,func: function(){CM.Disp.ToggleSayTime();}};
0 commit comments