Snippets code from my daily experience

December 23, 2007

How to detect the current active theme name on Firefox

Filed under: extension,firefox,gecko,nsIPrefBranch,skin,theme,xpcom — dafi @ 6:42 pm

Sometime obtaining informations about components isn’t so quick, you must iterate over RDF, XML or call many API.

Sometime is very simple like get a pref string… well this time I’m lucky 😉

The pref general.skins.selectedSkin contains the current active theme name.

var currentThemeName = Components.classes[';1']


Blog at

%d bloggers like this: