Can I change about: config in mozilla via javascript?

Hi, I'm developing an HTML 5 game, and in Chrome the animation looks great, but in firefox not! I searched over the Internet and I found a solution that I need to change some settings like: config, and they are:

webgl.force-enabled=true webgl.msaa-force=true layers.acceleration.force-enabled=true gfx.direct2d.force-enabled=true stagefright.force-enabled=true 

I change these settings manually and the animations look great in Firefox. Now my question is: how can I do this using javascript? Is it possible?

+8
javascript html5 firefox animation canvas
source share
2 answers

You should not change these settings - not on your computer, but especially on other people's computers. These settings will be included in any case, assuming that the hardware and drivers are capable of handling them. The force-enabled settings are intended only for testing, their inclusion can lead to instability (crashes in Firefox, crashes of graphic drivers).

Most likely, the reason Firefox did not turn on automatic hardware acceleration in your case is outdated drivers - you should install the current drivers for your video card and recommend that other people do the same.

+1
source share

The discussion on the MozillaZine forum involves creating a bookmarklet as follows (commands and code copied from there):

  • Make a file in the Firefox installation folder under the res directory, calling, for example, "proxy.htm", and put it in it:

     <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Proxy Toggle</title> <script type="text/javascript"> // <![CDATA[ function loaded() { netscape.security.PrivilegeManager .enablePrivilege("UniversalBrowserAccess UniversalXPConnect"); var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); if (prefs.getIntPref("network.proxy.type") == 0) { prefs.setIntPref("network.proxy.type", 1); } else { prefs.setIntPref("network.proxy.type", 0); } self.close(); }; self.onload = loaded; // ]]> </script> </head> <body> Please wait... </body> </html> 
  • Then make a bookmarklet to switch the pref proxy status and place it as a location:

     javascript: void(window.open('resource:///res/proxy.htm')); 

See: http://forums.mozillazine.org/viewtopic.php?f=7&t=87755

+3
source share

All Articles