Skip to content

Instantly share code, notes, and snippets.

@hyagni
Created October 23, 2010 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyagni/642035 to your computer and use it in GitHub Desktop.
Save hyagni/642035 to your computer and use it in GitHub Desktop.
change navigation bar color with caret-browse mode in keysnail
key.setViewKey(['C-c', 'C-a'], function (ev) {
children = document.getElementById("nav-bar").children;
for(i=0; i<children.length; i++){
children[i].style.backgroundColor = "pink";
}
util.setBoolPref("accessibility.browsewithcaret", true);
}, "Start Caret-Browse Mode");
key.setCaretKey(['C-c', 'C-a'], function (ev) {
children = document.getElementById("nav-bar").children;
for(i=0; i<children.length; i++){
children[i].style.backgroundColor = "transparent";
}
util.setBoolPref("accessibility.browsewithcaret", false);
}, "Exit Caret-Browse Mode");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment