mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
pt 1 in reviving the android build (copied from pm 28a1, wish me luck)
This commit is contained in:
parent
efa9662725
commit
d7788a6d6d
4249 changed files with 468189 additions and 0 deletions
27
mobile/android/tests/browser/chrome/video_discovery.sjs
Normal file
27
mobile/android/tests/browser/chrome/video_discovery.sjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function parseQuery(request, key) {
|
||||
var params = request.queryString.split('&');
|
||||
for (var j = 0; j < params.length; ++j) {
|
||||
var p = params[j];
|
||||
if (p == key)
|
||||
return true;
|
||||
if (p.indexOf(key + "=") == 0)
|
||||
return p.substring(key.length + 1);
|
||||
if (p.indexOf("=") < 0 && key == "")
|
||||
return p;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleRequest(request, response) {
|
||||
// Pretend to be the type requested from the test
|
||||
var type = parseQuery(request, "type");
|
||||
|
||||
response.setHeader("Content-Type", type, false);
|
||||
response.setHeader("Cache-Control", "no-cache", false);
|
||||
response.setHeader("Access-Control-Allow-Origin", "*", false);
|
||||
|
||||
response.write("fake video");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue