michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function decodeQuery(query) { michael@0: let result = {}; michael@0: query.split("&").forEach(function(pair) { michael@0: let [key, val] = pair.split("="); michael@0: result[key] = decodeURIComponent(val); michael@0: }); michael@0: return result; michael@0: } michael@0: michael@0: function handleRequest(request, response) { michael@0: response.setStatusLine(request.httpVersion, 200, "OK"); michael@0: response.setHeader("Content-Type", "text/html", false); michael@0: michael@0: let params = decodeQuery(request.queryString || ""); michael@0: michael@0: response.write('\n' + michael@0: '\n' + michael@0: 'Browser VKB Overlapping content '); michael@0: michael@0: if (params.metadata) michael@0: response.write(""); michael@0: michael@0: /* Write a spacer div into the document, above an input element*/ michael@0: response.write('\n' + michael@0: '\n' + michael@0: '
\n' + michael@0: '\n' + michael@0: '\n'); michael@0: }