Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <!DOCTYPE HTML>
2 <html>
4 <head>
5 </head>
7 <body>
9 <form id="subform1" onsubmit="return checkSubmit(21)">
10 <input id="subtest1" type="text" name="subtest1">
11 <button type="submit">Submit</button>
12 </form>
14 <form id="subform2" onsubmit="return checkSubmit(100)">
15 <input id="subtest2" type="text" name="subtest2">
16 <button type="submit">Submit</button>
17 </form>
19 <script>
20 function checkSubmit(num) {
21 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
22 return parent.checkSubmit(num);
23 }
25 function clickButton(num) {
26 if (num == 21)
27 document.querySelectorAll("button")[0].click();
28 else if (num == 100)
29 document.querySelectorAll("button")[1].click();
30 }
32 // set the input's value (can't use a default value, as satchel will ignore it)
33 document.getElementById("subtest1").value = "subtestValue";
34 document.getElementById("subtest2").value = "subtestValue";
35 </script>
37 </body>
38 </html>