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,78 @@
!function() {
function sendChromeEvent(detail) {
var contentDetail = Components.utils.createObjectIn(tab);
for (var i in detail) {
contentDetail[i] = detail[i];
}
Components.utils.makeObjectPropsNormal(contentDetail);
var customEvt = tab.document.createEvent('CustomEvent');
customEvt.initCustomEvent('mozChromeEvent', true, true, contentDetail);
tab.dispatchEvent(customEvt);
}
function sendEvent(type, details) {
var event = new tab.CustomEvent(type, details);
tab.dispatchEvent(event);
}
function takeScreenshot() {
var canvas = document.createElementNS('http://www.w3.org/1999/xhtml',
'canvas');
var width = tab.innerWidth;
var height = tab.innerHeight;
canvas.setAttribute('width', width);
canvas.setAttribute('height', height);
var context = canvas.getContext('2d');
var flags =
context.DRAWWINDOW_DRAW_CARET |
context.DRAWWINDOW_DRAW_VIEW |
context.DRAWWINDOW_USE_WIDGET_LAYERS;
context.drawWindow(tab, 0, 0, width, height,
'rgb(255,255,255)', flags);
sendChromeEvent({
type: 'take-screenshot-success',
file: canvas.mozGetAsFile('screenshot', 'image/png')
});
}
function Emulation() {
}
Emulation.prototype = {
notification: function() {
sendChromeEvent({
type: 'desktop-notification',
id: 123,
title: 'Some Notification',
text: 'I love notifications.',
manifestURL: 'http://sytem.gaiamobile.org:8080/manifest.webapp'
});
}
};
window.emulation = new Emulation();
function Workflow() {
}
Workflow.prototype = {
reload: function() {
var global = tab.wrappedJSObject;
var app = global.System.curentApp;
app.reload();
},
screenshot: function() {
takeScreenshot();
}
}
window.workflow = new Workflow();
}();