Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,24 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<meta charset="utf-8"/>
<!-- Specific style -->
<link rel="stylesheet" type="text/css" href="style/lists.css"/>
<script src="js/permissiontest.js"></script>
<title> Testing Permissions </title>
</head>
<body>
<div id="full">
<div id="main">
<h1>It works!</h1>
<p>Or at least the app loaded. Lets see below what happens.</p>
</div>
<div id="addContent">
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,134 @@
"use strict";
//////////////////////////////////////////////////////////////////////////////
// This exist so I don't have to keep remembering how to do it...
//////////////////////////////////////////////////////////////////////////////
function addText(elem,text) {
elem.appendChild(document.createTextNode(text));
}
function createElementAt(mainBody,type,id,optionalText,before) {
var elem=document.createElement(type);
elem.setAttribute("id",id);
if (!before) {
mainBody.appendChild(elem);
} else {
mainBody.insertBefore(elem,before);
}
if (optionalText) {
addText(elem,optionalText);
}
return elem;
}
//////////////////////////////////////////////////////////////////////////////
// End of useful DOM manipulation...
//////////////////////////////////////////////////////////////////////////////
function testPermissions(outputElement) {
var _permissions = [
'power', 'sms', 'contacts', 'telephony', 'browser',
'mozApps', 'mobileconnection', 'mozFM', 'systemXHR', 'background',
'backgroundservice', 'settings', 'alarm', 'camera', 'fmradio', 'voicemail',
'wifi-manage', 'wifi', 'networkstats-manage', 'geolocation',
'webapps-manage', 'permissions', 'desktop-notification',
'device-storage:pictures', 'device-storage:music', 'device-storage:videos',
'device-storage:apps', 'alarms', 'attention', 'content-camera',
'tcp-socket', 'bluetooth', 'storage', 'time', 'networkstats-manager',
'idle', 'network-events', 'embed-apps'
];
var mozPerms = navigator.mozPermissionSettings;
if (!mozPerms) {
createElementAt(outputElement,"p","","I can't access mozPermissionSettings!");
return;
}
navigator.mozApps.mgmt.getAll().onsuccess = function mozAppGotAll(evt) {
var apps = evt.target.result;
apps.sort(function alphabeticalSort(app, otherApp) {
return app.manifest.name > otherApp.manifest.name;
});
// We display permissions declared in the manifest
// and any other granted permission. I should see how forEach works some time.
// Some OTHER time
createElementAt(outputElement,"p","",
"List of application permissions below. "+
"Click on any permission to toggle its value.");
createElementAt(outputElement,"p","",
"NOTE: Trying to toggle a implicit permission"+
" should not work!");
var ulApps=createElementAt(outputElement,"ul");
for (var i=0; i<apps.length; i++) {
var app=apps[i];
var liApp=createElementAt(ulApps,"li");
liApp.innerHTML="<b>"+app.manifest.name+"</b>";
var ulPerm=createElementAt(ulApps,"ul");
ulPerm.hidden=true;
liApp.onclick=function () {
arguments[0].hidden=!arguments[0].hidden;
}.bind(undefined,ulPerm);
for (var j=0; j<_permissions.length; j++) {
var perm=_permissions[j];
var value = mozPerms.get(perm, app.manifestURL, app.origin, false);
if (value !== "unknown") {
var explicit =
mozPerms.isExplicit(perm, app.manifestURL, app.origin, false) ?
"/explicit" :"/implicit";
var printValue = value + explicit;
var li=createElementAt(ulPerm,"li",app.manifest.name+":"+perm,
perm +": "+printValue);
li.onclick=function() {
togglePermission(arguments[0], arguments[1], arguments[2]);
}.bind(undefined, app, perm, li);
}
}
}
};
}
function togglePermission(app,perm,item) {
var mozPerms = navigator.mozPermissionSettings;
var value = mozPerms.get(perm, app.manifestURL, app.origin, false);
console.log("Trying to change permission for "+app.manifest.name+
" perm: "+perm+" Current Value: "+value);
var newPerm="deny";
switch ( value ) {
case "deny":
newPerm = "prompt";
break;
case "prompt":
newPerm = "allow";
break;
}
mozPerms.set(perm, newPerm, app.manifestURL, app.origin, false);
// Nasty nasty suspicion
setTimeout(function () {
var newValue = mozPerms.get(perm, app.manifestURL, app.origin, false);
var explicit =
mozPerms.isExplicit(perm, app.manifestURL, app.origin, false) ?
"/explicit" :"/implicit";
console.log("After changing permission for "+app.manifest.name+
" perm: "+perm+" New Value: "+newValue+explicit);
item.innerHTML=perm+": "+newValue+explicit;
},1000);
}
window.onload=function () {
var outputElement=document.getElementById("addContent");
testPermissions(outputElement);
}

View file

@ -0,0 +1,22 @@
{
"name": "TestPermissions",
"description": "Permissions Test",
"launch_path": "/index.html",
"orientation": "portrait-primary",
"type": "certified",
"fullscreen": true,
"developer": {
"name": "amac"
},
"permissions": {
"webapps-manage":{},
"permissions": {}
},
"locales": {
"en-US": {
"name": "Permissions Test",
"description": "Permissions Tests"
}
},
"default_locale": "en-US"
}

View file

@ -0,0 +1,268 @@
/**
* Table View
* line height = 6rem, border included
*/
ul {
margin: 0;
padding: 0;
overflow: hidden;
list-style: none;
}
ul li {
position: relative;
border-bottom: 0.1rem solid #e6e6e3;
color: #000;
-moz-box-sizing: border-box;
min-height: 6rem;
}
ul li.active,
ul li:active {
background-color: #ddf;
color: #222;
}
ul li > a,
ul li > span {
display: block;
text-decoration: none;
outline: 0;
color: #000;
-moz-box-sizing: border-box;
height: 6rem;
font-size: 1.9rem;
line-height: 6rem;
padding: 0 3rem;
}
ul li.disabled > a {
color: gray;
pointer-events: none;
}
/* description + value on the same line */
ul li > a span {
position: absolute;
right: 2rem;
color: #505859;
}
/* text ellipsis */
ul li > * {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* sublines */
ul li > small {
position: absolute;
left: 3rem;
right: 3rem;
top: 50%;
padding-top: 0.4rem;
font-size: 1.4rem;
color: #505859;
/* click/tap events should be caught by the <a> element below the <small> */
pointer-events: none;
}
ul li > label:not([for]) + small {
right: 6rem;
}
/* required for empty elements like Bluetooth */
ul li > small:not(:empty) + a {
line-height: 4.4rem;
}
/******************************************************************************
* Boolean inputs
*/
ul li button,
ul li a.bb-button {
position: relative;
top: 1rem;
left: 2rem;
font-size: 1.7rem;
line-height: 1em;
width: calc(100% - 5rem);
height: calc(100% - 2rem);
}
/* custom styles for boolean inputs (see /shared/style/switches.css) */
ul li label {
text-transform: none;
}
ul li > label:not([for]) {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
ul li > label:not([for]) > span {
left: auto;
right: 2rem;
}
ul li > label:not([for]) ~ a {
padding-right: 6rem;
}
/******************************************************************************
* Text inputs
*/
ul li p {
font-size: 1.9rem;
font-weight: 400;
margin: 0;
padding: 1rem 3rem;
}
ul li p + label:not([for]) {
top: 2.5rem;
height: calc(100% - 2.5rem);
}
ul li p + input[type="text"],
ul li p + input[type="password"] {
width: calc(100% - 6rem);
margin: -1rem auto 1rem;
}
/******************************************************************************
* Range inputs
*/
ul li > label input[type="range"] {
width: 80%;
width: calc(100% - 6rem);
margin-left: 3rem;
margin-top: 2rem;
}
/******************************************************************************
* Select boxes
*/
ul li select {
font-size: 1.9rem;
height: 3rem;
line-height: 3rem;
text-align: center;
}
/* half-width select boxes */
ul li span select {
display: inline-block;
position: absolute;
top: 1.5rem;
right: 3rem;
width: calc(50% - 2rem);
}
/* full-width select boxes */
ul li p + select {
display: block;
width: calc(100% - 15rem);
margin: -1rem 3rem 1rem 12rem;
}
/******************************************************************************
* Progress, Meter
*/
ul li progress, ul li meter {
display: block;
width: calc(100% - 6rem);
height: 3rem;
margin: 2.5rem auto;
}
/******************************************************************************
* Definition lists
*/
dl > * {
font-size: 1.7em;
}
dl dt {
padding-left: 3rem;
font-weight: 500;
border-bottom: 0.1rem solid black;
}
dl dd {
margin: 0;
padding: 1rem 3rem;
border-bottom: 0.1rem solid #e6e6e3; /* same as "ul li" */
}
/******************************************************************************
* Right-to-Left layout
*/
/* definition lists */
html[dir="rtl"] dl dt {
padding-left: inherit;
padding-right: 3rem;
}
/* half-width select boxes */
html[dir="rtl"] ul li span select {
left: 3rem;
right: inherit;
}
/* full-width select boxes */
html[dir="rtl"] ul li p + select {
margin: -1rem 12rem 1rem 3rem;
}
/* boolean inputs */
html[dir="rtl"] ul li button,
html[dir="rtl"] ul li a.bb-button {
left: inherit;
right: 2rem;
}
html[dir="rtl"] ul li > label:not([for]) > span {
left: 4rem; /* XXX we use "right: 2rem" for LTR layouts... */
right: inherit;
}
html[dir="rtl"] ul li > label:not([for]) ~ a {
padding-left: 6rem;
padding-right: 3rem;
}
/* description + value on the same line */
html[dir="rtl"] ul li > a span {
left: 2rem;
right: inherit;
}
/* main list items */
html[dir="rtl"] ul li > a,
html[dir="rtl"] ul li > span {
padding-left: inherit;
padding-right: 3rem;
}