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
7
assets/webapps/settings.gaiamobile.org/js/settings.js
Normal file
7
assets/webapps/settings.gaiamobile.org/js/settings.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
window.Settings={get hasMozSettings(){var settings=navigator.mozSettings;return(settings&&typeof(settings.createLock)=='function')?settings:null;},isTabletAndLandscape:function is_tablet_and_landscape(){return this.ScreenLayout.getCurrentLayout('tabletAndLandscaped');},_isTabletAndLandscapeLastTime:null,rotate:function rotate(evt){var isTabletAndLandscapeThisTime=Settings.isTabletAndLandscape();var panelsWithCurrentClass;if(Settings._isTabletAndLandscapeLastTime!==isTabletAndLandscapeThisTime){panelsWithCurrentClass=document.querySelectorAll('section[role="region"].current');if(panelsWithCurrentClass.length===1&&panelsWithCurrentClass[0].id==='root'){Settings.currentPanel=Settings.initialPanelForTablet;}}
|
||||
Settings._isTabletAndLandscapeLastTime=isTabletAndLandscapeThisTime;},initialPanelForTablet:'#wifi',_currentPanel:null,get currentPanel(){return this._currentPanel;},set currentPanel(hash){if(!hash.startsWith('#')){hash='#'+hash;}
|
||||
if(hash===this._currentPanel){return;}
|
||||
var panelID=hash;if(panelID.startsWith('#')){panelID=panelID.substring(1);}
|
||||
this.SettingsService.navigate(panelID,this._initialOptions);},get _initialOptions(){delete this._initialOptions;return window.LaunchContext.activityHandler&&window.LaunchContext.activityHandler.targetPanelOptions;},init:function settings_init(options){if(!this.hasMozSettings||!navigator.mozSetMessageHandler){return;}
|
||||
this.SettingsService=options.SettingsService;this.ScreenLayout=options.ScreenLayout;this.currentPanel=window.LaunchContext.initialPanelId;setTimeout((function nextTick(){this.ScreenLayout.watch('tabletAndLandscaped','(min-width: 768px) and (orientation: landscape)');window.addEventListener('screenlayoutchange',this.rotate);if(this.isTabletAndLandscape()){this.currentPanel=this.initialPanelForTablet;}}).bind(this));window.performance.mark('startupPathEnd');}};
|
||||
Loading…
Reference in a new issue