mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-23 13:33:32 +01:00
Be nicer to color blind people.
This commit is contained in:
@@ -29,7 +29,7 @@ Highlights.prototype.CSS = <![CDATA[
|
|||||||
Object color: maroon;
|
Object color: maroon;
|
||||||
String color: green;
|
String color: green;
|
||||||
|
|
||||||
Enabled color: green;
|
Enabled color: blue;
|
||||||
Disabled color: red;
|
Disabled color: red;
|
||||||
|
|
||||||
Normal color: black; background: white;
|
Normal color: black; background: white;
|
||||||
|
|||||||
@@ -136,19 +136,23 @@ function setCharPref(name, value)
|
|||||||
|
|
||||||
function loadPref(name, store, type)
|
function loadPref(name, store, type)
|
||||||
{
|
{
|
||||||
if (store)
|
try
|
||||||
var pref = getCharPref(name);
|
|
||||||
if (!pref && storage.infoPath)
|
|
||||||
var file = readFile(getFile(name));
|
|
||||||
if (pref || file)
|
|
||||||
var result = json.decode(pref || file);
|
|
||||||
if (pref)
|
|
||||||
{
|
{
|
||||||
prefService.clearUserPref(name);
|
if (store)
|
||||||
savePref({ name: name, store: true, serial: pref });
|
var pref = getCharPref(name);
|
||||||
|
if (!pref && storage.infoPath)
|
||||||
|
var file = readFile(getFile(name));
|
||||||
|
if (pref || file)
|
||||||
|
var result = json.decode(pref || file);
|
||||||
|
if (pref)
|
||||||
|
{
|
||||||
|
prefService.clearUserPref(name);
|
||||||
|
savePref({ name: name, store: true, serial: pref });
|
||||||
|
}
|
||||||
|
if (result instanceof type)
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
if (result instanceof type)
|
catch (e) {}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function savePref(obj)
|
function savePref(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user