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:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
|
|
@ -0,0 +1 @@
|
|||
this.asyncStorage=function(){"use strict";function r(r){if(f)r();else{var n=indexedDB.open(i,s);n.onerror=function(){console.error("asyncStorage: can't open database:",n.error.name)},n.onupgradeneeded=function(){n.result.createObjectStore(l)},n.onsuccess=function(){f=n.result,r()}}}function n(n,e,o){r(function(){var r=f.transaction(l,n);o&&(r.oncomplete=o),e(r.objectStore(l))})}function e(r,e){var o;n("readonly",function(n){o=n.get(r),o.onerror=function(){console.error("Error in asyncStorage.getItem(): ",o.error.name)}},function(){var r=o.result;void 0===r&&(r=null),e(r)})}function o(r,e,o){n("readwrite",function(n){var o=n.put(e,r);o.onerror=function(){console.error("Error in asyncStorage.setItem(): ",o.error.name)}},o)}function t(r,e){n("readwrite",function(n){var e=n["delete"](r);e.onerror=function(){console.error("Error in asyncStorage.removeItem(): ",e.error.name)}},e)}function c(r){n("readwrite",function(r){var n=r.clear();n.onerror=function(){console.error("Error in asyncStorage.clear(): ",n.error.name)}},r)}function a(r){var e;n("readonly",function(r){e=r.count(),e.onerror=function(){console.error("Error in asyncStorage.length(): ",e.error.name)}},function(){r(e.result)})}function u(r,e){if(0>r)return void e(null);var o;n("readonly",function(n){var e=!1;o=n.openCursor(),o.onsuccess=function(){var n=o.result;n&&(0===r||e||(e=!0,n.advance(r)))},o.onerror=function(){console.error("Error in asyncStorage.key(): ",o.error.name)}},function(){var r=o.result;e(r?r.key:null)})}var i="asyncStorage",s=1,l="keyvaluepairs",f=null;return{getItem:e,setItem:o,removeItem:t,clear:c,length:a,key:u}}();
|
||||
|
|
@ -0,0 +1 @@
|
|||
var BluetoothHelper=function(){var n={HFP:4382,A2DP:4365},t=window.navigator.mozBluetooth,e=!1,o=[],i=null,c=null,a=!0,s=function(n){n&&t&&(e?n():o.push(n))},d=function(n,t,e){n.onsuccess=function(){t&&t(n.result)},n.onerror=function(){console.log("Error handling bluetooth request"),e&&e()}},u=function(){i?(e=!0,o.forEach(function(n){n()}),o=[]):console.log("BluetoothHelper(): connot get default adapter yet")},r=function(){t.onattributechanged=function(n){for(var e in n.attrs)switch(n.attrs[e]){case"defaultAdapter":console.log("defaultAdapter changed. address:",t.defaultAdapter.address),i=t.defaultAdapter,u()}},i=t.defaultAdapter,i&&u()},f=function(){var n=t.getDefaultAdapter();n&&(n.onsuccess=function(){i&&(c=i),e=!0,i=n.result,c&&c.onpairedstatuschanged&&(i.onpairedstatuschanged=c.onpairedstatuschanged),o.forEach(function(n){n()}),o=[]},n.onerror=function(){console.log("BluetoothHelper(): connot get default adapter!!!")})},l=function(){a?r():f()},g=function(){i&&(c=i),e=!1,i=null};return t&&("undefined"==typeof t.onattributechanged&&(a=!1),a?t.onadapteradded=function(n){l()}:(t.addEventListener("enabled",l),t.addEventListener("adapteradded",l),t.addEventListener("disabled",g)),l()),{profiles:n,answerWaitingCall:function(){s(function(){i.answerWaitingCall()})},ignoreWaitingCall:function(){s(function(){i.ignoreWaitingCall()})},toggleCalls:function(){s(function(){i.toggleCalls()})},getConnectedDevicesByProfile:function(n,t){s(function(){d(i.getConnectedDevices(n),t)})},connectSco:function(n){s(function(){d(i.connectSco(),n)})},disconnectSco:function(n){s(function(){d(i.disconnectSco(),n)})},getPairedDevices:function(n){s(function(){d(i.getPairedDevices(),n)})},getAddress:function(n){return a?void console.log("getAddress function is deprecated"):void s(function(){var t=i.address;n(t)})},setPairingConfirmation:function(n,t){return a?void console.log("setPairingConfirmation API is deprecated"):void s(function(){i.setPairingConfirmation(n,t)})},setPinCode:function(n,t){return a?void console.log("setPairingConfirmation API is deprecated"):void s(function(){i.setPinCode(n,t)})},setPasskey:function(n,t){return a?void console.log("setPairingConfirmation API is deprecated"):void s(function(){i.setPasskey(n,t)})},isScoConnected:function(n,t){s(function(){d(i.isScoConnected(),n,t)})},sendMediaMetaData:function(n,t,e){s(function(){d(i.sendMediaMetaData(n),t,e)})},sendMediaPlayStatus:function(n,t,e){s(function(){d(i.sendMediaPlayStatus(n),t,e)})},set onhfpstatuschanged(n){s(function(){i.onhfpstatuschanged=n})},set onscostatuschanged(n){s(function(){i.onscostatuschanged=n})},set ona2dpstatuschanged(n){s(function(){i.ona2dpstatuschanged=n})},set onrequestmediaplaystatus(n){s(function(){i.onrequestmediaplaystatus=n})},set onpairedstatuschanged(n){return a?void console.log("onpairedstatuschanged API is deprecated"):void s(function(){i.onpairedstatuschanged=n})},v2:a,enable:function(){a?s(function(){i.enable()}):console.log("enable is not support in v1 API!")},disable:function(){a?s(function(){i.disable()}):console.log("disable is not support in v1 API!")}}};
|
||||
|
|
@ -0,0 +1 @@
|
|||
;;!function(t){"use strict";t.ComponentUtils={style:function(t){var e=document.createElement("style"),i=t+"style.css",s=this;e.setAttribute("scoped",""),e.innerHTML="@import url("+i+");",this.appendChild(e),this.style.visibility="hidden",e.addEventListener("load",function(){s.shadowRoot&&s.shadowRoot.appendChild(e.cloneNode(!0)),s.style.visibility=""})}}}(window);
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,8 @@
|
|||
;;(function(window){'use strict';window.NotificationHelper={getIconURI:function nh_getIconURI(app,entryPoint){var icons=app.manifest.icons;if(entryPoint){icons=app.manifest.entry_points[entryPoint].icons;}
|
||||
if(!icons){return null;}
|
||||
var sizes=Object.keys(icons).map(function parse(str){return parseInt(str,10);});sizes.sort(function(x,y){return y-x;});var HVGA=document.documentElement.clientWidth<480;var index=sizes[HVGA?sizes.length-1:0];return app.installOrigin+icons[index];},send:function nh_send(titleL10n,options){return Promise.all([titleL10n,options.bodyL10n].map(getL10n)).then(([title,body])=>{if(body){options.body=body;}
|
||||
options.lang=document.documentElement.getAttribute('lang');var notification=new window.Notification(title,options);if(options.closeOnClick!==false){notification.addEventListener('click',function nh_click(){notification.removeEventListener('click',nh_click);notification.close();});}
|
||||
return notification;});},};function getL10n(l10nAttrs){if(!l10nAttrs){return;}
|
||||
if(typeof l10nAttrs==='string'){return document.l10n.formatValue(l10nAttrs);}
|
||||
if(typeof l10nAttrs.raw==="string"){return l10nAttrs.raw;}
|
||||
return document.l10n.formatValue(l10nAttrs.id,l10nAttrs.args);}})(this);
|
||||
Loading…
Reference in a new issue