mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Added incognito mode
This commit is contained in:
@ -33,6 +33,10 @@ ComunicWeb.common.api = {
|
||||
|
||||
}
|
||||
|
||||
//Enable incognito mode if required
|
||||
if(ComunicWeb.components.incognito.management.isEnabled())
|
||||
params.incognito = true;
|
||||
|
||||
//Prepare data to send in request
|
||||
var count = 0;
|
||||
var datas = "";
|
||||
@ -90,7 +94,11 @@ ComunicWeb.common.api = {
|
||||
data.append('userToken2', tokens.token2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Enable incognito mode if required
|
||||
if(ComunicWeb.components.incognito.management.isEnabled())
|
||||
data.append("incognito", true);
|
||||
|
||||
//Create request
|
||||
var apiXHR = new XMLHttpRequest();
|
||||
|
@ -1107,7 +1107,35 @@ var ComunicWeb = {
|
||||
*/
|
||||
darkTheme: {
|
||||
//TODO : implement
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Incognito mode component
|
||||
*/
|
||||
incognito: {
|
||||
|
||||
/**
|
||||
* Keyboard catcher
|
||||
*/
|
||||
keyboard: {
|
||||
//TODO : implement
|
||||
},
|
||||
|
||||
/**
|
||||
* Incognito management
|
||||
*/
|
||||
management: {
|
||||
//TODO : implement
|
||||
},
|
||||
|
||||
/**
|
||||
* UI management
|
||||
*/
|
||||
ui: {
|
||||
//TODO : implement
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -277,6 +277,11 @@ ComunicWeb.common.page = {
|
||||
|
||||
//Call the method related to the page
|
||||
eval(pageInfos.methodHandler + ("(additionnalData, pageTarget);"));
|
||||
|
||||
//Propagate information
|
||||
SendEvent("openPage", {
|
||||
page: pageURI
|
||||
});
|
||||
|
||||
//Success
|
||||
return true;
|
||||
|
@ -48,6 +48,16 @@ ComunicWeb.common.system = {
|
||||
*/
|
||||
ComunicWeb.common.langs.initLanguages();
|
||||
|
||||
/**
|
||||
* Initialize incognito mode detection
|
||||
*/
|
||||
ComunicWeb.components.incognito.management.init();
|
||||
|
||||
/**
|
||||
* Refresh dark theme mode
|
||||
*/
|
||||
ComunicWeb.components.darkTheme.refresh();
|
||||
|
||||
/**
|
||||
* What to do after login refresh
|
||||
*/
|
||||
@ -81,11 +91,6 @@ ComunicWeb.common.system = {
|
||||
}), 25000);
|
||||
ComunicWeb.common.cacheManager.registerInterval(autoRefresh);
|
||||
|
||||
/**
|
||||
* Refresh dark theme mode
|
||||
*/
|
||||
ComunicWeb.components.darkTheme.refresh();
|
||||
|
||||
//Success
|
||||
return true;
|
||||
},
|
||||
|
@ -682,4 +682,22 @@ function ApplySceditorStyle(textarea){
|
||||
|
||||
//Apply new styles to body
|
||||
iframeDOM.body.className += " sceditor-iframe-body";
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a new javascript event
|
||||
*
|
||||
* @param {String} name The name of the event to create
|
||||
* @param {Object} details Information about the event to create
|
||||
*/
|
||||
function SendEvent(name, details){
|
||||
|
||||
var event = new CustomEvent(name, {
|
||||
detail: details,
|
||||
bubbles: true,
|
||||
cancelable: false
|
||||
});
|
||||
|
||||
document.dispatchEvent(event);
|
||||
|
||||
}
|
Reference in New Issue
Block a user