Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
6 function boom()
7 {
8 var root = document.documentElement;
9 while(root.firstChild) { root.removeChild(root.firstChild); }
10 var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
11 body.setAttributeNS(null, "contenteditable", "true");
12 var img = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
13 body.appendChild(img);
14 root.appendChild(body);
15 document.removeChild(root);
16 document.appendChild(root);
17 document.execCommand("insertText", false, "5");
18 document.execCommand("selectAll", false, null);
19 document.execCommand("insertParagraph", false, null);
20 document.execCommand("increasefontsize", false, null);
21 }
23 </script>
24 </head>
26 <body onload="boom();"></body>
27 </html>