Option sections are now collapsable
This commit is contained in:
233
CookieMonster.js
233
CookieMonster.js
@@ -510,7 +510,7 @@ CM.LoadConfig = function() {
|
|||||||
if (mod) CM.SaveConfig(CM.Config);
|
if (mod) CM.SaveConfig(CM.Config);
|
||||||
CM.Loop(); // Do loop once
|
CM.Loop(); // Do loop once
|
||||||
for (var i in CM.ConfigDefault) {
|
for (var i in CM.ConfigDefault) {
|
||||||
if (i != 'StatsPref' && typeof CM.ConfigData[i].func !== 'undefined') {
|
if (i != 'StatsPref' && i != 'MenuPref' && typeof CM.ConfigData[i].func !== 'undefined') {
|
||||||
CM.ConfigData[i].func();
|
CM.ConfigData[i].func();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -573,6 +573,16 @@ CM.ToggleStatsConfig = function(config) {
|
|||||||
CM.SaveConfig(CM.Config);
|
CM.SaveConfig(CM.Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.ToggleMenuConfig = function(config) {
|
||||||
|
if (CM.Config.MenuPref[config] == 0) {
|
||||||
|
CM.Config.MenuPref[config]++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CM.Config.MenuPref[config]--;
|
||||||
|
}
|
||||||
|
CM.SaveConfig(CM.Config);
|
||||||
|
}
|
||||||
|
|
||||||
// Checks if the browsers has permissions to produce notifications
|
// Checks if the browsers has permissions to produce notifications
|
||||||
// Should be triggered when Config related to Notifications is toggled on
|
// Should be triggered when Config related to Notifications is toggled on
|
||||||
CM.CheckNotificationPermissions = function(ToggleOnOff) {
|
CM.CheckNotificationPermissions = function(ToggleOnOff) {
|
||||||
@@ -1917,14 +1927,28 @@ CM.Disp.CreateTooltip = function(placeholder, text, minWidth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CM.Disp.AddMenuPref = function(title) {
|
CM.Disp.AddMenuPref = function(title) {
|
||||||
var header = function(text) {
|
var header = function(text, config) {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.className = 'listing';
|
div.className = 'listing';
|
||||||
div.style.padding = '5px 16px';
|
div.style.padding = '5px 16px';
|
||||||
div.style.opacity = '0.7';
|
div.style.opacity = '0.7';
|
||||||
div.style.fontSize = '17px';
|
div.style.fontSize = '17px';
|
||||||
div.style.fontFamily = '\"Kavoon\", Georgia, serif';
|
div.style.fontFamily = '\"Kavoon\", Georgia, serif';
|
||||||
div.textContent = text;
|
div.appendChild(document.createTextNode(text + ' '));
|
||||||
|
var span = document.createElement('span');
|
||||||
|
span.style.cursor = 'pointer';
|
||||||
|
span.style.display = 'inline-block';
|
||||||
|
span.style.height = '14px';
|
||||||
|
span.style.width = '14px';
|
||||||
|
span.style.borderRadius = '7px';
|
||||||
|
span.style.textAlign = 'center';
|
||||||
|
span.style.backgroundColor = '#C0C0C0';
|
||||||
|
span.style.color = 'black';
|
||||||
|
span.style.fontSize = '13px';
|
||||||
|
span.style.verticalAlign = 'middle';
|
||||||
|
span.textContent = CM.Config.MenuPref[config] ? '-' : '+';
|
||||||
|
span.onclick = function() {CM.ToggleMenuConfig(config); Game.UpdateMenu();};
|
||||||
|
div.appendChild(span);
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2008,107 +2032,119 @@ CM.Disp.AddMenuPref = function(title) {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Bars/Colors'));
|
frag.appendChild(header('Bars/Colors', 'BarsColors'));
|
||||||
frag.appendChild(listing('BotBar'));
|
if (CM.Config.MenuPref.BarsColors) {
|
||||||
frag.appendChild(listing('TimerBar'));
|
frag.appendChild(listing('BotBar'));
|
||||||
frag.appendChild(listing('TimerBarPos'));
|
frag.appendChild(listing('TimerBar'));
|
||||||
frag.appendChild(listing('SortBuildings'));
|
frag.appendChild(listing('TimerBarPos'));
|
||||||
frag.appendChild(listing('SortUpgrades'));
|
frag.appendChild(listing('SortBuildings'));
|
||||||
frag.appendChild(listing('BuildColor'));
|
frag.appendChild(listing('SortUpgrades'));
|
||||||
frag.appendChild(listing('BulkBuildColor'));
|
frag.appendChild(listing('BuildColor'));
|
||||||
frag.appendChild(listing('ColorPPBulkMode'));
|
frag.appendChild(listing('BulkBuildColor'));
|
||||||
frag.appendChild(listing('UpBarColor'));
|
frag.appendChild(listing('ColorPPBulkMode'));
|
||||||
for (var i = 0; i < CM.Disp.colors.length; i++) {
|
frag.appendChild(listing('UpBarColor'));
|
||||||
var div = document.createElement('div');
|
for (var i = 0; i < CM.Disp.colors.length; i++) {
|
||||||
div.className = 'listing';
|
var div = document.createElement('div');
|
||||||
var input = document.createElement('input');
|
div.className = 'listing';
|
||||||
input.id = CM.ConfigPrefix + 'Color' + CM.Disp.colors[i];
|
var input = document.createElement('input');
|
||||||
input.className = 'option';
|
input.id = CM.ConfigPrefix + 'Color' + CM.Disp.colors[i];
|
||||||
input.style.width = '65px';
|
input.className = 'option';
|
||||||
input.setAttribute('value', CM.Config.Colors[CM.Disp.colors[i]]);
|
input.style.width = '65px';
|
||||||
div.appendChild(input);
|
input.setAttribute('value', CM.Config.Colors[CM.Disp.colors[i]]);
|
||||||
eval('var change = function() {CM.Config.Colors[\'' + CM.Disp.colors[i] + '\'] = l(CM.ConfigPrefix + \'Color\' + \'' + CM.Disp.colors[i] + '\').value; CM.Disp.UpdateColors(); CM.SaveConfig(CM.Config);}');
|
div.appendChild(input);
|
||||||
var jscolorpicker = new jscolor.color(input, {hash: true, caps: false, pickerZIndex: 1000000, pickerPosition: 'right', onImmediateChange: change});
|
eval('var change = function() {CM.Config.Colors[\'' + CM.Disp.colors[i] + '\'] = l(CM.ConfigPrefix + \'Color\' + \'' + CM.Disp.colors[i] + '\').value; CM.Disp.UpdateColors(); CM.SaveConfig(CM.Config);}');
|
||||||
var label = document.createElement('label');
|
var jscolorpicker = new jscolor.color(input, {hash: true, caps: false, pickerZIndex: 1000000, pickerPosition: 'right', onImmediateChange: change});
|
||||||
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];
|
var label = document.createElement('label');
|
||||||
div.appendChild(label);
|
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];
|
||||||
frag.appendChild(div);
|
div.appendChild(label);
|
||||||
|
frag.appendChild(div);
|
||||||
|
}
|
||||||
|
frag.appendChild(listing('UpgradeBarFixedPos'));
|
||||||
}
|
}
|
||||||
frag.appendChild(listing('UpgradeBarFixedPos'));
|
|
||||||
|
|
||||||
frag.appendChild(header('Calculation'));
|
frag.appendChild(header('Calculation', 'Calculation'));
|
||||||
frag.appendChild(listing('CalcWrink'));
|
if (CM.Config.MenuPref.Calculation) {
|
||||||
frag.appendChild(listing('CPSMode'));
|
frag.appendChild(listing('CalcWrink'));
|
||||||
frag.appendChild(listing('AvgCPSHist'));
|
frag.appendChild(listing('CPSMode'));
|
||||||
frag.appendChild(listing('AvgClicksHist'));
|
frag.appendChild(listing('AvgCPSHist'));
|
||||||
frag.appendChild(listing('ToolWarnBon'));
|
frag.appendChild(listing('AvgClicksHist'));
|
||||||
|
frag.appendChild(listing('ToolWarnBon'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Notification'));
|
frag.appendChild(header('Notification', 'Notification'));
|
||||||
frag.appendChild(listing('GCNotification'));
|
if (CM.Config.MenuPref.Notification) {
|
||||||
frag.appendChild(listing('GCFlash'));
|
frag.appendChild(listing('GCNotification'));
|
||||||
frag.appendChild(listing('GCSound'));
|
frag.appendChild(listing('GCFlash'));
|
||||||
frag.appendChild(vol('GCVolume'));
|
frag.appendChild(listing('GCSound'));
|
||||||
frag.appendChild(url('GCSoundURL'));
|
frag.appendChild(vol('GCVolume'));
|
||||||
frag.appendChild(listing('GCTimer'));
|
frag.appendChild(url('GCSoundURL'));
|
||||||
frag.appendChild(listing('Favicon'));
|
frag.appendChild(listing('GCTimer'));
|
||||||
frag.appendChild(listing('FortuneNotification'));
|
frag.appendChild(listing('Favicon'));
|
||||||
frag.appendChild(listing('FortuneFlash'));
|
frag.appendChild(listing('FortuneNotification'));
|
||||||
frag.appendChild(listing('FortuneSound'));
|
frag.appendChild(listing('FortuneFlash'));
|
||||||
frag.appendChild(vol('FortuneVolume'));
|
frag.appendChild(listing('FortuneSound'));
|
||||||
frag.appendChild(url('FortuneSoundURL'));
|
frag.appendChild(vol('FortuneVolume'));
|
||||||
frag.appendChild(listing('SeaNotification'));
|
frag.appendChild(url('FortuneSoundURL'));
|
||||||
frag.appendChild(listing('SeaFlash'));
|
frag.appendChild(listing('SeaNotification'));
|
||||||
frag.appendChild(listing('SeaSound'));
|
frag.appendChild(listing('SeaFlash'));
|
||||||
frag.appendChild(vol('SeaVolume'));
|
frag.appendChild(listing('SeaSound'));
|
||||||
frag.appendChild(url('SeaSoundURL'));
|
frag.appendChild(vol('SeaVolume'));
|
||||||
frag.appendChild(listing('GardFlash'));
|
frag.appendChild(url('SeaSoundURL'));
|
||||||
frag.appendChild(listing('GardSound'));
|
frag.appendChild(listing('GardFlash'));
|
||||||
frag.appendChild(vol('GardVolume'));
|
frag.appendChild(listing('GardSound'));
|
||||||
frag.appendChild(url('GardSoundURL'));
|
frag.appendChild(vol('GardVolume'));
|
||||||
frag.appendChild(listing('MagicNotification'));
|
frag.appendChild(url('GardSoundURL'));
|
||||||
frag.appendChild(listing('MagicFlash'));
|
frag.appendChild(listing('MagicNotification'));
|
||||||
frag.appendChild(listing('MagicSound'));
|
frag.appendChild(listing('MagicFlash'));
|
||||||
frag.appendChild(vol('MagicVolume'));
|
frag.appendChild(listing('MagicSound'));
|
||||||
frag.appendChild(url('MagicSoundURL'));
|
frag.appendChild(vol('MagicVolume'));
|
||||||
frag.appendChild(listing('WrinklerNotification'));
|
frag.appendChild(url('MagicSoundURL'));
|
||||||
frag.appendChild(listing('WrinklerFlash'));
|
frag.appendChild(listing('WrinklerNotification'));
|
||||||
frag.appendChild(listing('WrinklerSound'));
|
frag.appendChild(listing('WrinklerFlash'));
|
||||||
frag.appendChild(vol('WrinklerVolume'));
|
frag.appendChild(listing('WrinklerSound'));
|
||||||
frag.appendChild(url('WrinklerSoundURL'));
|
frag.appendChild(vol('WrinklerVolume'));
|
||||||
frag.appendChild(listing('WrinklerMaxNotification'));
|
frag.appendChild(url('WrinklerSoundURL'));
|
||||||
frag.appendChild(listing('WrinklerMaxFlash'));
|
frag.appendChild(listing('WrinklerMaxNotification'));
|
||||||
frag.appendChild(listing('WrinklerMaxSound'));
|
frag.appendChild(listing('WrinklerMaxFlash'));
|
||||||
frag.appendChild(vol('WrinklerMaxVolume'));
|
frag.appendChild(listing('WrinklerMaxSound'));
|
||||||
frag.appendChild(url('WrinklerMaxSoundURL'));
|
frag.appendChild(vol('WrinklerMaxVolume'));
|
||||||
frag.appendChild(listing('Title'));
|
frag.appendChild(url('WrinklerMaxSoundURL'));
|
||||||
|
frag.appendChild(listing('Title'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Tooltip'));
|
frag.appendChild(header('Tooltip', 'Tooltip'));
|
||||||
frag.appendChild(listing('TooltipBuildUp'));
|
if (CM.Config.MenuPref.Tooltip) {
|
||||||
frag.appendChild(listing('TooltipAmor'));
|
frag.appendChild(listing('TooltipBuildUp'));
|
||||||
frag.appendChild(listing('ToolWarnLucky'));
|
frag.appendChild(listing('TooltipAmor'));
|
||||||
frag.appendChild(listing('ToolWarnConjure'));
|
frag.appendChild(listing('ToolWarnLucky'));
|
||||||
frag.appendChild(listing('ToolWarnPos'));
|
frag.appendChild(listing('ToolWarnConjure'));
|
||||||
frag.appendChild(listing('TooltipGrim'));
|
frag.appendChild(listing('ToolWarnPos'));
|
||||||
frag.appendChild(listing('ToolWrink'));
|
frag.appendChild(listing('TooltipGrim'));
|
||||||
frag.appendChild(listing('TooltipLump'));
|
frag.appendChild(listing('ToolWrink'));
|
||||||
|
frag.appendChild(listing('TooltipLump'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Statistics'));
|
frag.appendChild(header('Statistics', 'Statistics'));
|
||||||
frag.appendChild(listing('Stats'));
|
if (CM.Config.MenuPref.Statistics) {
|
||||||
frag.appendChild(listing('UpStats'));
|
frag.appendChild(listing('Stats'));
|
||||||
frag.appendChild(listing('TimeFormat'));
|
frag.appendChild(listing('UpStats'));
|
||||||
frag.appendChild(listing('SayTime'));
|
frag.appendChild(listing('TimeFormat'));
|
||||||
frag.appendChild(listing('GrimoireBar'));
|
frag.appendChild(listing('SayTime'));
|
||||||
|
frag.appendChild(listing('GrimoireBar'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Other'));
|
frag.appendChild(header('Other', 'Other'));
|
||||||
frag.appendChild(listing('Scale'));
|
if (CM.Config.MenuPref.Other) {
|
||||||
var resDef = document.createElement('div');
|
frag.appendChild(listing('Scale'));
|
||||||
resDef.className = 'listing';
|
var resDef = document.createElement('div');
|
||||||
var resDefBut = document.createElement('a');
|
resDef.className = 'listing';
|
||||||
resDefBut.className = 'option';
|
var resDefBut = document.createElement('a');
|
||||||
resDefBut.onclick = function() {CM.RestoreDefault();};
|
resDefBut.className = 'option';
|
||||||
resDefBut.textContent = 'Restore Default';
|
resDefBut.onclick = function() {CM.RestoreDefault();};
|
||||||
resDef.appendChild(resDefBut);
|
resDefBut.textContent = 'Restore Default';
|
||||||
frag.appendChild(resDef);
|
resDef.appendChild(resDefBut);
|
||||||
|
frag.appendChild(resDef);
|
||||||
|
}
|
||||||
|
|
||||||
l('menu').childNodes[2].insertBefore(frag, l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1]);
|
l('menu').childNodes[2].insertBefore(frag, l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1]);
|
||||||
|
|
||||||
@@ -3515,6 +3551,7 @@ CM.ConfigDefault = {
|
|||||||
SayTime: 1,
|
SayTime: 1,
|
||||||
GrimoireBar: 1,
|
GrimoireBar: 1,
|
||||||
Scale: 2,
|
Scale: 2,
|
||||||
|
MenuPref: {BarsColors: 1, Calculation: 1, Notification: 1, Tooltip: 1, Statistics: 1, Other: 1},
|
||||||
StatsPref: {Lucky: 1, Conjure: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
|
StatsPref: {Lucky: 1, Conjure: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
|
||||||
Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
||||||
SortBuildings: 0,
|
SortBuildings: 0,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ CM.LoadConfig = function() {
|
|||||||
if (mod) CM.SaveConfig(CM.Config);
|
if (mod) CM.SaveConfig(CM.Config);
|
||||||
CM.Loop(); // Do loop once
|
CM.Loop(); // Do loop once
|
||||||
for (var i in CM.ConfigDefault) {
|
for (var i in CM.ConfigDefault) {
|
||||||
if (i != 'StatsPref' && typeof CM.ConfigData[i].func !== 'undefined') {
|
if (i != 'StatsPref' && i != 'MenuPref' && typeof CM.ConfigData[i].func !== 'undefined') {
|
||||||
CM.ConfigData[i].func();
|
CM.ConfigData[i].func();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,6 +114,16 @@ CM.ToggleStatsConfig = function(config) {
|
|||||||
CM.SaveConfig(CM.Config);
|
CM.SaveConfig(CM.Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.ToggleMenuConfig = function(config) {
|
||||||
|
if (CM.Config.MenuPref[config] == 0) {
|
||||||
|
CM.Config.MenuPref[config]++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CM.Config.MenuPref[config]--;
|
||||||
|
}
|
||||||
|
CM.SaveConfig(CM.Config);
|
||||||
|
}
|
||||||
|
|
||||||
// Checks if the browsers has permissions to produce notifications
|
// Checks if the browsers has permissions to produce notifications
|
||||||
// Should be triggered when Config related to Notifications is toggled on
|
// Should be triggered when Config related to Notifications is toggled on
|
||||||
CM.CheckNotificationPermissions = function(ToggleOnOff) {
|
CM.CheckNotificationPermissions = function(ToggleOnOff) {
|
||||||
|
|||||||
220
src/Disp.js
220
src/Disp.js
@@ -1179,14 +1179,28 @@ CM.Disp.CreateTooltip = function(placeholder, text, minWidth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CM.Disp.AddMenuPref = function(title) {
|
CM.Disp.AddMenuPref = function(title) {
|
||||||
var header = function(text) {
|
var header = function(text, config) {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.className = 'listing';
|
div.className = 'listing';
|
||||||
div.style.padding = '5px 16px';
|
div.style.padding = '5px 16px';
|
||||||
div.style.opacity = '0.7';
|
div.style.opacity = '0.7';
|
||||||
div.style.fontSize = '17px';
|
div.style.fontSize = '17px';
|
||||||
div.style.fontFamily = '\"Kavoon\", Georgia, serif';
|
div.style.fontFamily = '\"Kavoon\", Georgia, serif';
|
||||||
div.textContent = text;
|
div.appendChild(document.createTextNode(text + ' '));
|
||||||
|
var span = document.createElement('span');
|
||||||
|
span.style.cursor = 'pointer';
|
||||||
|
span.style.display = 'inline-block';
|
||||||
|
span.style.height = '14px';
|
||||||
|
span.style.width = '14px';
|
||||||
|
span.style.borderRadius = '7px';
|
||||||
|
span.style.textAlign = 'center';
|
||||||
|
span.style.backgroundColor = '#C0C0C0';
|
||||||
|
span.style.color = 'black';
|
||||||
|
span.style.fontSize = '13px';
|
||||||
|
span.style.verticalAlign = 'middle';
|
||||||
|
span.textContent = CM.Config.MenuPref[config] ? '-' : '+';
|
||||||
|
span.onclick = function() {CM.ToggleMenuConfig(config); Game.UpdateMenu();};
|
||||||
|
div.appendChild(span);
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1270,107 +1284,119 @@ CM.Disp.AddMenuPref = function(title) {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Bars/Colors'));
|
frag.appendChild(header('Bars/Colors', 'BarsColors'));
|
||||||
frag.appendChild(listing('BotBar'));
|
if (CM.Config.MenuPref.BarsColors) {
|
||||||
frag.appendChild(listing('TimerBar'));
|
frag.appendChild(listing('BotBar'));
|
||||||
frag.appendChild(listing('TimerBarPos'));
|
frag.appendChild(listing('TimerBar'));
|
||||||
frag.appendChild(listing('SortBuildings'));
|
frag.appendChild(listing('TimerBarPos'));
|
||||||
frag.appendChild(listing('SortUpgrades'));
|
frag.appendChild(listing('SortBuildings'));
|
||||||
frag.appendChild(listing('BuildColor'));
|
frag.appendChild(listing('SortUpgrades'));
|
||||||
frag.appendChild(listing('BulkBuildColor'));
|
frag.appendChild(listing('BuildColor'));
|
||||||
frag.appendChild(listing('ColorPPBulkMode'));
|
frag.appendChild(listing('BulkBuildColor'));
|
||||||
frag.appendChild(listing('UpBarColor'));
|
frag.appendChild(listing('ColorPPBulkMode'));
|
||||||
for (var i = 0; i < CM.Disp.colors.length; i++) {
|
frag.appendChild(listing('UpBarColor'));
|
||||||
var div = document.createElement('div');
|
for (var i = 0; i < CM.Disp.colors.length; i++) {
|
||||||
div.className = 'listing';
|
var div = document.createElement('div');
|
||||||
var input = document.createElement('input');
|
div.className = 'listing';
|
||||||
input.id = CM.ConfigPrefix + 'Color' + CM.Disp.colors[i];
|
var input = document.createElement('input');
|
||||||
input.className = 'option';
|
input.id = CM.ConfigPrefix + 'Color' + CM.Disp.colors[i];
|
||||||
input.style.width = '65px';
|
input.className = 'option';
|
||||||
input.setAttribute('value', CM.Config.Colors[CM.Disp.colors[i]]);
|
input.style.width = '65px';
|
||||||
div.appendChild(input);
|
input.setAttribute('value', CM.Config.Colors[CM.Disp.colors[i]]);
|
||||||
eval('var change = function() {CM.Config.Colors[\'' + CM.Disp.colors[i] + '\'] = l(CM.ConfigPrefix + \'Color\' + \'' + CM.Disp.colors[i] + '\').value; CM.Disp.UpdateColors(); CM.SaveConfig(CM.Config);}');
|
div.appendChild(input);
|
||||||
var jscolorpicker = new jscolor.color(input, {hash: true, caps: false, pickerZIndex: 1000000, pickerPosition: 'right', onImmediateChange: change});
|
eval('var change = function() {CM.Config.Colors[\'' + CM.Disp.colors[i] + '\'] = l(CM.ConfigPrefix + \'Color\' + \'' + CM.Disp.colors[i] + '\').value; CM.Disp.UpdateColors(); CM.SaveConfig(CM.Config);}');
|
||||||
var label = document.createElement('label');
|
var jscolorpicker = new jscolor.color(input, {hash: true, caps: false, pickerZIndex: 1000000, pickerPosition: 'right', onImmediateChange: change});
|
||||||
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];
|
var label = document.createElement('label');
|
||||||
div.appendChild(label);
|
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];
|
||||||
frag.appendChild(div);
|
div.appendChild(label);
|
||||||
|
frag.appendChild(div);
|
||||||
|
}
|
||||||
|
frag.appendChild(listing('UpgradeBarFixedPos'));
|
||||||
}
|
}
|
||||||
frag.appendChild(listing('UpgradeBarFixedPos'));
|
|
||||||
|
|
||||||
frag.appendChild(header('Calculation'));
|
frag.appendChild(header('Calculation', 'Calculation'));
|
||||||
frag.appendChild(listing('CalcWrink'));
|
if (CM.Config.MenuPref.Calculation) {
|
||||||
frag.appendChild(listing('CPSMode'));
|
frag.appendChild(listing('CalcWrink'));
|
||||||
frag.appendChild(listing('AvgCPSHist'));
|
frag.appendChild(listing('CPSMode'));
|
||||||
frag.appendChild(listing('AvgClicksHist'));
|
frag.appendChild(listing('AvgCPSHist'));
|
||||||
frag.appendChild(listing('ToolWarnBon'));
|
frag.appendChild(listing('AvgClicksHist'));
|
||||||
|
frag.appendChild(listing('ToolWarnBon'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Notification'));
|
frag.appendChild(header('Notification', 'Notification'));
|
||||||
frag.appendChild(listing('GCNotification'));
|
if (CM.Config.MenuPref.Notification) {
|
||||||
frag.appendChild(listing('GCFlash'));
|
frag.appendChild(listing('GCNotification'));
|
||||||
frag.appendChild(listing('GCSound'));
|
frag.appendChild(listing('GCFlash'));
|
||||||
frag.appendChild(vol('GCVolume'));
|
frag.appendChild(listing('GCSound'));
|
||||||
frag.appendChild(url('GCSoundURL'));
|
frag.appendChild(vol('GCVolume'));
|
||||||
frag.appendChild(listing('GCTimer'));
|
frag.appendChild(url('GCSoundURL'));
|
||||||
frag.appendChild(listing('Favicon'));
|
frag.appendChild(listing('GCTimer'));
|
||||||
frag.appendChild(listing('FortuneNotification'));
|
frag.appendChild(listing('Favicon'));
|
||||||
frag.appendChild(listing('FortuneFlash'));
|
frag.appendChild(listing('FortuneNotification'));
|
||||||
frag.appendChild(listing('FortuneSound'));
|
frag.appendChild(listing('FortuneFlash'));
|
||||||
frag.appendChild(vol('FortuneVolume'));
|
frag.appendChild(listing('FortuneSound'));
|
||||||
frag.appendChild(url('FortuneSoundURL'));
|
frag.appendChild(vol('FortuneVolume'));
|
||||||
frag.appendChild(listing('SeaNotification'));
|
frag.appendChild(url('FortuneSoundURL'));
|
||||||
frag.appendChild(listing('SeaFlash'));
|
frag.appendChild(listing('SeaNotification'));
|
||||||
frag.appendChild(listing('SeaSound'));
|
frag.appendChild(listing('SeaFlash'));
|
||||||
frag.appendChild(vol('SeaVolume'));
|
frag.appendChild(listing('SeaSound'));
|
||||||
frag.appendChild(url('SeaSoundURL'));
|
frag.appendChild(vol('SeaVolume'));
|
||||||
frag.appendChild(listing('GardFlash'));
|
frag.appendChild(url('SeaSoundURL'));
|
||||||
frag.appendChild(listing('GardSound'));
|
frag.appendChild(listing('GardFlash'));
|
||||||
frag.appendChild(vol('GardVolume'));
|
frag.appendChild(listing('GardSound'));
|
||||||
frag.appendChild(url('GardSoundURL'));
|
frag.appendChild(vol('GardVolume'));
|
||||||
frag.appendChild(listing('MagicNotification'));
|
frag.appendChild(url('GardSoundURL'));
|
||||||
frag.appendChild(listing('MagicFlash'));
|
frag.appendChild(listing('MagicNotification'));
|
||||||
frag.appendChild(listing('MagicSound'));
|
frag.appendChild(listing('MagicFlash'));
|
||||||
frag.appendChild(vol('MagicVolume'));
|
frag.appendChild(listing('MagicSound'));
|
||||||
frag.appendChild(url('MagicSoundURL'));
|
frag.appendChild(vol('MagicVolume'));
|
||||||
frag.appendChild(listing('WrinklerNotification'));
|
frag.appendChild(url('MagicSoundURL'));
|
||||||
frag.appendChild(listing('WrinklerFlash'));
|
frag.appendChild(listing('WrinklerNotification'));
|
||||||
frag.appendChild(listing('WrinklerSound'));
|
frag.appendChild(listing('WrinklerFlash'));
|
||||||
frag.appendChild(vol('WrinklerVolume'));
|
frag.appendChild(listing('WrinklerSound'));
|
||||||
frag.appendChild(url('WrinklerSoundURL'));
|
frag.appendChild(vol('WrinklerVolume'));
|
||||||
frag.appendChild(listing('WrinklerMaxNotification'));
|
frag.appendChild(url('WrinklerSoundURL'));
|
||||||
frag.appendChild(listing('WrinklerMaxFlash'));
|
frag.appendChild(listing('WrinklerMaxNotification'));
|
||||||
frag.appendChild(listing('WrinklerMaxSound'));
|
frag.appendChild(listing('WrinklerMaxFlash'));
|
||||||
frag.appendChild(vol('WrinklerMaxVolume'));
|
frag.appendChild(listing('WrinklerMaxSound'));
|
||||||
frag.appendChild(url('WrinklerMaxSoundURL'));
|
frag.appendChild(vol('WrinklerMaxVolume'));
|
||||||
frag.appendChild(listing('Title'));
|
frag.appendChild(url('WrinklerMaxSoundURL'));
|
||||||
|
frag.appendChild(listing('Title'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Tooltip'));
|
frag.appendChild(header('Tooltip', 'Tooltip'));
|
||||||
frag.appendChild(listing('TooltipBuildUp'));
|
if (CM.Config.MenuPref.Tooltip) {
|
||||||
frag.appendChild(listing('TooltipAmor'));
|
frag.appendChild(listing('TooltipBuildUp'));
|
||||||
frag.appendChild(listing('ToolWarnLucky'));
|
frag.appendChild(listing('TooltipAmor'));
|
||||||
frag.appendChild(listing('ToolWarnConjure'));
|
frag.appendChild(listing('ToolWarnLucky'));
|
||||||
frag.appendChild(listing('ToolWarnPos'));
|
frag.appendChild(listing('ToolWarnConjure'));
|
||||||
frag.appendChild(listing('TooltipGrim'));
|
frag.appendChild(listing('ToolWarnPos'));
|
||||||
frag.appendChild(listing('ToolWrink'));
|
frag.appendChild(listing('TooltipGrim'));
|
||||||
frag.appendChild(listing('TooltipLump'));
|
frag.appendChild(listing('ToolWrink'));
|
||||||
|
frag.appendChild(listing('TooltipLump'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Statistics'));
|
frag.appendChild(header('Statistics', 'Statistics'));
|
||||||
frag.appendChild(listing('Stats'));
|
if (CM.Config.MenuPref.Statistics) {
|
||||||
frag.appendChild(listing('UpStats'));
|
frag.appendChild(listing('Stats'));
|
||||||
frag.appendChild(listing('TimeFormat'));
|
frag.appendChild(listing('UpStats'));
|
||||||
frag.appendChild(listing('SayTime'));
|
frag.appendChild(listing('TimeFormat'));
|
||||||
frag.appendChild(listing('GrimoireBar'));
|
frag.appendChild(listing('SayTime'));
|
||||||
|
frag.appendChild(listing('GrimoireBar'));
|
||||||
|
}
|
||||||
|
|
||||||
frag.appendChild(header('Other'));
|
frag.appendChild(header('Other', 'Other'));
|
||||||
frag.appendChild(listing('Scale'));
|
if (CM.Config.MenuPref.Other) {
|
||||||
var resDef = document.createElement('div');
|
frag.appendChild(listing('Scale'));
|
||||||
resDef.className = 'listing';
|
var resDef = document.createElement('div');
|
||||||
var resDefBut = document.createElement('a');
|
resDef.className = 'listing';
|
||||||
resDefBut.className = 'option';
|
var resDefBut = document.createElement('a');
|
||||||
resDefBut.onclick = function() {CM.RestoreDefault();};
|
resDefBut.className = 'option';
|
||||||
resDefBut.textContent = 'Restore Default';
|
resDefBut.onclick = function() {CM.RestoreDefault();};
|
||||||
resDef.appendChild(resDefBut);
|
resDefBut.textContent = 'Restore Default';
|
||||||
frag.appendChild(resDef);
|
resDef.appendChild(resDefBut);
|
||||||
|
frag.appendChild(resDef);
|
||||||
|
}
|
||||||
|
|
||||||
l('menu').childNodes[2].insertBefore(frag, l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1]);
|
l('menu').childNodes[2].insertBefore(frag, l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1]);
|
||||||
|
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ CM.ConfigDefault = {
|
|||||||
SayTime: 1,
|
SayTime: 1,
|
||||||
GrimoireBar: 1,
|
GrimoireBar: 1,
|
||||||
Scale: 2,
|
Scale: 2,
|
||||||
|
MenuPref: {BarsColors: 1, Calculation: 1, Notification: 1, Tooltip: 1, Statistics: 1, Other: 1},
|
||||||
StatsPref: {Lucky: 1, Conjure: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
|
StatsPref: {Lucky: 1, Conjure: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1},
|
||||||
Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
||||||
SortBuildings: 0,
|
SortBuildings: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user