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 function handleRequest(request, response)
2 {
3 // First item will be the ID; other items are optional
4 var query = request.queryString.split(/&/);
6 response.setHeader("Content-Type", "text/css", false);
8 if (query.indexOf("cors-anonymous") != -1) {
9 response.setHeader("Access-Control-Allow-Origin", "*", false);
10 } else if (query.indexOf("cors-credentials") != -1 &&
11 request.hasHeader("Origin")) {
12 response.setHeader("Access-Control-Allow-Origin",
13 request.getHeader("Origin"), false)
14 response.setHeader("Access-Control-Allow-Credentials", "true", false);
15 }
17 response.write("#" + query[0] + " { color: green !important }" + "\n" +
18 "#" + query[0] + ".reverse { color: red !important }");
19 }