Skip to content

Commit

Permalink
Ignore: prefix with '_' properties that are only used by functions in…
Browse files Browse the repository at this point in the history
…side the AiOS object
  • Loading branch information
fofajardo committed Mar 18, 2018
1 parent 05ec870 commit 8da93c5
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions content/aios_old.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var AiOS = {
* Initialization
* => Called through the onload event
*/
initialized: false,
_initialized: false,
initSidebar: function () {
AiOS_Objects.get();

Expand Down Expand Up @@ -235,7 +235,7 @@ var AiOS = {
if (document.getElementById('PlacesToolbarItems'))
document.getElementById('PlacesToolbarItems').removeAttribute('orient');

AiOS.initialized = true;
AiOS._initialized = true;
},

/*
Expand Down Expand Up @@ -444,7 +444,7 @@ var AiOS = {
* => this mouse-over event adds a mouse-over event to the "appcontent" ...
* => which calls this function
*/
autoTimeout: null,
_autoTimeout: null,
autoShowHide: function (mode) {
var autobutton = aios_getBoolean('aios-enableAutohide', 'checked');

Expand Down Expand Up @@ -474,16 +474,16 @@ var AiOS = {
else
delay = delayshow;
// Show/hide after a certain time
AiOS.autoTimeout = window.setTimeout(function () {
AiOS._autoTimeout = window.setTimeout(function () {
AiOS.toggleSidebar('switch');
}, delay);

// Remove the timeout if the mouse was too short on the switch or was clicked
AiOS_Objects.sbSwitch.addEventListener("mouseout", function () {
window.clearTimeout(AiOS.autoTimeout);
window.clearTimeout(AiOS._autoTimeout);
}, true);
AiOS_Objects.sbSwitch.addEventListener("click", function () {
window.clearTimeout(AiOS.autoTimeout);
window.clearTimeout(AiOS._autoTimeout);
}, true);

return true;
Expand All @@ -498,13 +498,13 @@ var AiOS = {
document.getElementById('appcontent').removeEventListener("mouseover", AiOS.autoShowHide, true);

// Hide after a certain time
AiOS.autoTimeout = window.setTimeout(function () {
AiOS._autoTimeout = window.setTimeout(function () {
AiOS.toggleSidebar('switch');
}, delayhide);

// Remove the timeout when the mouse comes back in the sidebar
AiOS_Objects.sidebarBox.addEventListener("mouseover", function () {
window.clearTimeout(AiOS.autoTimeout);
window.clearTimeout(AiOS._autoTimeout);
}, true);
}
}
Expand Down Expand Up @@ -602,7 +602,7 @@ var AiOS = {
* aios_BrowserFullScreen() and aios_savePrefs() in prefs.js
*/
checkSidebarSwitch: function () {
if (!AiOS.initialized)
if (!AiOS._initialized)
return;

AiOS_Objects.get();
Expand Down Expand Up @@ -702,8 +702,8 @@ var AiOS = {
* Extends the browser function BrowserFullScreen() to control the AiOS elements
* => Call by aios_initSidebar()
*/
enterFullScreen: 0,
leaveFullScreen: 0,
_enterFullScreen: 0,
_leaveFullScreen: 0,
browserFullScreen: function () {
AiOS_Objects.get();

Expand All @@ -717,9 +717,9 @@ var AiOS = {
// => hide elements
if (document.mozFullScreenElement || window.fullScreen) {
// Fix for multiple firing of the mozfullscreenchange event
AiOS.leaveFullScreen = 0;
AiOS.enterFullScreen++;
if (AiOS.enterFullScreen > 1)
AiOS._leaveFullScreen = 0;
AiOS._enterFullScreen++;
if (AiOS._enterFullScreen > 1)
return;

try {
Expand Down Expand Up @@ -767,9 +767,9 @@ var AiOS = {
// => Show elements
else {
// Fix for multiple firing of the mozfullscreenchange event
AiOS.enterFullScreen = 0;
AiOS.leaveFullScreen++;
if (AiOS.leaveFullScreen > 1)
AiOS._enterFullScreen = 0;
AiOS._leaveFullScreen++;
if (AiOS._leaveFullScreen > 1)
return;

// Restore Toolbar Settings (only without the Autohide extension)
Expand Down

0 comments on commit 8da93c5

Please sign in to comment.