source: osm/utils/josm/plugins/ywms/resources/config.html@ 2264

Last change on this file since 2264 was 2264, checked in by frederik, 18 years ago

New plugin by Francisco R. Santos <frsantos@…>

File size: 2.9 KB
Line 
1<html>
2 <head>
3 <script type="text/javascript">
4 function configure()
5 {
6 // Require privileges to change configuration
7 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalPreferencesRead");
8 var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
9 var ok = true;
10
11 // when this properties are created with "string" instead of "boolean", it throws an error
12 // Jus delete the profile and create again.
13 try
14 {
15 // Enable dump to console
16 prefs.setBoolPref("browser.dom.window.dump.enabled", true);
17 // navigator.preference("browser.dom.window.dump.enabled", true);
18 }
19 catch(err)
20 {
21 ok = false;
22 alert( "Error setting 'browser.dom.window.dump.enabled'=true :" + err );
23 }
24
25 try
26 {
27 // Disable resume from crash
28 prefs.setBoolPref("browser.sessionstore.resume_from_crash",false);
29 // navigator.preference("browser.sessionstore.resume_from_crash", "false");
30 }
31 catch(err)
32 {
33 ok = false;
34 alert( "Error setting 'browser.sessionstore.resume_from_crash'=false :" + err );
35 }
36
37 if( ok )
38 {
39 document.getElementById("closeMsg").style.visibility = "inherit";
40 document.getElementById("errorMsg").style.visibility = "hidden";
41 } // Seems that both configuration changes need differente ways of modification. Some mozilla bug??
42
43 else
44 {
45 document.getElementById("closeMsg").style.visibility = "hidden";
46 document.getElementById("errorMsg").style.visibility = "inherit";
47 }
48 }
49 </script>
50
51 </head>
52
53<body>
54 <h2>YWMS Plugin configuration</h2>
55
56 The configuration of the profile needs some extra modificationsof the
57 browser profile:
58 <ol>
59 <li><h4>The Javascript method <i>dump</i> must be active.</h4>
60 This method allows Javascrip code to write data to the output stream of the browser,
61 and can be activated with the config option <i>browser.dom.window.dump.enabled</i>.</li><br>
62 <li><h4>Session recovery must be inactive</h4>
63 Session crash recovery will try to reopen the pages you were viewing before a browser crash,
64 but for this JOSM plugin, this feature is not useful. This feature can be deactivated
65 with the config option <i>browser.sessionstore.resume_from_crash</i>
66 </li>
67 </ol>
68
69 These configuration propoerties can be modified automatically just clicking in the button below,
70 that will ask for permissions to do so. Just accept to allow the modifications.
71 <br>
72 <br>
73 <button type="button" name="configure" value="Configure" onClick="configure()">Make changes</button>
74 <br>
75 <br>
76 <div id="closeMsg" style="visibility:hidden;"><blink>Close this browser window to start using JOSM with the YWMS plugin</blink></div>
77 <div id="errorMsg" style="visibility:hidden;"><blink>Configuration properties not properly modified.</blink></div>
78
79</body>
80</html>
Note: See TracBrowser for help on using the repository browser.