update proxy release

This commit is contained in:
Cynthia Foxwell 2018-07-11 18:32:22 -06:00
parent 9297c285b1
commit 1d4fc955bf
4 changed files with 383 additions and 344 deletions

View File

@ -6,6 +6,12 @@
<meta property="og:description" content="Instructions for installing Lambda" /> <meta property="og:description" content="Instructions for installing Lambda" />
<meta property="og:image" content="/lambda.png" /> <meta property="og:image" content="/lambda.png" />
<script>
function updatePayload() {
document.querySelector('code').innerText = `DiscordNative.globals.appSettings.set('UPDATE_ENDPOINT','https://proxy.xn--lmbda-2be.cf/api');DiscordNative.globals.appSettings.save();reloadElectronApp()`
}
</script>
<style> <style>
@font-face { @font-face {
font-family: 'IBMVGA8'; font-family: 'IBMVGA8';
@ -45,9 +51,9 @@
<body> <body>
<div>L&lambda;mbda</div> <div>L&lambda;mbda</div>
<a href="https://gitlab.com/Cynosphere/lambda-patcher">Grab the Lambda Patcher</a> Copy and paste the following string into your Discord console:
<br> <br>
<p>Lambda does not have any Discord internal injection methods anymore.</p> <code>please wait...</code>
<br> <br>
<b>This is a fork of EndPwn3.</b> <b>This is a fork of EndPwn3.</b>
</body> </body>

View File

@ -17,7 +17,7 @@
*/ */
var internal = { /*var internal = {
print: function (str) { print: function (str) {
console.log(`%c[Customizer]%c ` + str, 'font-weight:bold;color:#0cc', ''); console.log(`%c[Customizer]%c ` + str, 'font-weight:bold;color:#0cc', '');
@ -120,3 +120,4 @@ exports = {
} }
} }
*/

View File

@ -16,286 +16,318 @@
https://github.com/endpwn/ https://github.com/endpwn/
*/ */
exports = {
manifest: {
replacements: [
{
signature: /{section:(\w)\.SectionTypes\.DIVIDER},{section:"logout",/g,
payload: '{section:$1.SectionTypes.DIVIDER},{section:"ENDPWN",label:"ΣndPwn Settings",element:window.BlankSettingsElement,color:"#0cc"},{section:$1.SectionTypes.DIVIDER},{section:"logout",'
}
],
},
init: function () { if (window.$api === undefined && typeof $api != "undefined") {
console.warn(
"$api is defined, but window.$api is not! assuming we are running under epapi6 and exporting an empty object..."
);
exports = {};
} else
exports = {
manifest: {
replacements: [
{
signature: /{section:(\w)\.SectionTypes\.DIVIDER},{section:"logout",/g,
payload:
'{section:$1.SectionTypes.DIVIDER},{section:"ENDPWN",label:"ΣndPwn Settings",element:window.BlankSettingsElement,color:"#0cc"},{section:$1.SectionTypes.DIVIDER},{section:"logout",'
}
]
},
delete endpwn.settings.init; init: function() {
delete endpwn.settings.init;
var currentSection = ''; var currentSection = "";
$api.events.listen('ENDPWN_PSEUDO_IPC', msg => { /*$api.events.listen('ENDPWN_PSEUDO_IPC', msg => {
$api.localStorage.set('customizer_signature', JSON.parse(msg.data).signature); $api.localStorage.set('customizer_signature', JSON.parse(msg.data).signature);
console.log(currentSection); console.log(currentSection);
renderSettings(currentSection); renderSettings(currentSection);
}); });*/
window.BlankSettingsElement = $api.util.findConstructor('FormSection', 'FormSection').FormSection; window.BlankSettingsElement = $api.util.findConstructor(
"FormSection",
"FormSection"
).FormSection;
var buttons = $api.util.findFuncExports('button-', 'colorBlack'); var buttons = $api.util.findFuncExports("button-", "colorBlack");
var checkboxes = $api.util.findFuncExports('checkboxEnabled'); var checkboxes = $api.util.findFuncExports("checkboxEnabled");
var misc = $api.util.findFuncExports('statusRed-', 'inputDefault'); var misc = $api.util.findFuncExports("statusRed-", "inputDefault");
var misc2 = $api.util.findFuncExports('multiInputField'); var misc2 = $api.util.findFuncExports("multiInputField");
var headers = $api.util.findFuncExports('h5-', 'h5'); var headers = $api.util.findFuncExports("h5-", "h5");
var panels = wc.findFunc('flexChild-')[0].exports; var panels = wc.findFunc("flexChild-")[0].exports;
var panels2 = $api.util.findFuncExports('errorMessage-', 'inputWrapper'); var panels2 = $api.util.findFuncExports(
"errorMessage-",
"inputWrapper"
);
function createVerticalPanel() { function createVerticalPanel() {
return createElement("div") return createElement("div").withClass(
.withClass(panels2.vertical, 'epButtonPanel') panels2.vertical,
} "epButtonPanel"
function createHorizontalPanel() {
return createElement("div")
.withClass(panels.horizontal, 'epButtonPanel')
}
function createButton(name) {
return createElement('button')
.withContents(name)
.withClass(
buttons.button,
buttons.lookFilled,
buttons.colorBrand,
buttons.sizeSmall,
buttons.grow,
'epMargin'
); );
}
function createWarnButton(name) {
return createElement('button')
.withContents(name)
.withClass(
buttons.button,
buttons.lookOutlined,
buttons.colorYellow,
buttons.sizeSmall,
buttons.grow,
'epMargin'
);
}
function createDangerButton(name) {
return createElement('button')
.withContents(name)
.withClass(
buttons.button,
buttons.lookOutlined,
buttons.colorRed,
buttons.sizeSmall,
buttons.grow,
'epMargin'
);
}
function createH2(text) {
//h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi defaultColor-1_ajX0 defaultMarginh2-2LTaUL marginBottom20-32qID7
return createElement("h2")
.withClass(
headers.h2,
headers.title,
headers.size16,
headers.height20,
headers.weightSemiBold,
headers.defaultColor,
'epMargin'
)
.withText(text);
}
function createH5(text) {
return createElement("h5")
.withClass(
headers.h5,
headers.title,
headers.size12,
headers.height16,
headers.weightSemiBold
)
.withText(text);
}
function createInput(v) {
return createElement("input")
.withClass(
misc.inputDefault,
misc.input,
misc.size16,
'epMargin'
)
.modify(x => x.value = v)
}
//<input class="checkboxEnabled-CtinEn checkbox-2tyjJg" type="checkbox">
//switchEnabled-V2WDBB switch-3wwwcV valueUnchecked-2lU_20 value-2hFrkk sizeDefault-2YlOZr size-3rFEHg themeDefault-24hCdX
//switchEnabled-V2WDBB switch-3wwwcV valueChecked-m-4IJZ value-2hFrkk sizeDefault-2YlOZr size-3rFEHg themeDefault-24hCdX
function updateSwitch(s, w) {
if (s.checked) {
w.classList.remove(checkboxes.valueUnchecked.split(' ')[0]);
w.classList.add(checkboxes.valueChecked.split(' ')[0])
} }
else {
w.classList.remove(checkboxes.valueChecked.split(' ')[0]); function createHorizontalPanel() {
w.classList.add(checkboxes.valueUnchecked.split(' ')[0]) return createElement("div").withClass(
panels.horizontal,
"epButtonPanel"
);
} }
}
function createSwitch(c, i) { function createButton(name) {
if (c === undefined) c = () => { }; return createElement("button")
if (i === undefined) i = false; .withContents(name)
var s, w = createElement('div') .withClass(
.withClass( buttons.button,
checkboxes.switch, buttons.lookFilled,
checkboxes.switchEnabled, buttons.colorBrand,
checkboxes.size, buttons.sizeSmall,
checkboxes.sizeDefault, buttons.grow,
checkboxes.themeDefault "epMargin"
) );
.withChildren( }
s = createElement("input")
function createWarnButton(name) {
return createElement("button")
.withContents(name)
.withClass(
buttons.button,
buttons.lookOutlined,
buttons.colorYellow,
buttons.sizeSmall,
buttons.grow,
"epMargin"
);
}
function createDangerButton(name) {
return createElement("button")
.withContents(name)
.withClass(
buttons.button,
buttons.lookOutlined,
buttons.colorRed,
buttons.sizeSmall,
buttons.grow,
"epMargin"
);
}
function createH2(text) {
//h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi defaultColor-1_ajX0 defaultMarginh2-2LTaUL marginBottom20-32qID7
return createElement("h2")
.withClass(
headers.h2,
headers.title,
headers.size16,
headers.height20,
headers.weightSemiBold,
headers.defaultColor,
"epMargin"
)
.withText(text);
}
function createH5(text) {
return createElement("h5")
.withClass(
headers.h5,
headers.title,
headers.size12,
headers.height16,
headers.weightSemiBold
)
.withText(text);
}
function createInput(v) {
return createElement("input")
.withClass(
misc.inputDefault,
misc.input,
misc.size16,
"epMargin"
)
.modify(x => (x.value = v));
}
//<input class="checkboxEnabled-CtinEn checkbox-2tyjJg" type="checkbox">
//switchEnabled-V2WDBB switch-3wwwcV valueUnchecked-2lU_20 value-2hFrkk sizeDefault-2YlOZr size-3rFEHg themeDefault-24hCdX
//switchEnabled-V2WDBB switch-3wwwcV valueChecked-m-4IJZ value-2hFrkk sizeDefault-2YlOZr size-3rFEHg themeDefault-24hCdX
function updateSwitch(s, w) {
if (s.checked) {
w.classList.remove(checkboxes.valueUnchecked.split(" ")[0]);
w.classList.add(checkboxes.valueChecked.split(" ")[0]);
} else {
w.classList.remove(checkboxes.valueChecked.split(" ")[0]);
w.classList.add(checkboxes.valueUnchecked.split(" ")[0]);
}
}
function createSwitch(c, i) {
if (c === undefined) c = () => {};
if (i === undefined) i = false;
var s,
w = createElement("div")
.withClass( .withClass(
checkboxes.checkbox, checkboxes.switch,
checkboxes.checkboxEnabled checkboxes.switchEnabled,
checkboxes.size,
checkboxes.sizeDefault,
checkboxes.themeDefault
) )
.modify(x => x.type = 'checkbox') .withChildren(
.modify(x => x.checked = i) (s = createElement("input")
.modify(x => x.onchange = () => { .withClass(
updateSwitch(s, w); checkboxes.checkbox,
c(s.checked); checkboxes.checkboxEnabled
}) )
) .modify(x => (x.type = "checkbox"))
updateSwitch(s, w); .modify(x => (x.checked = i))
return w; .modify(
} x =>
(x.onchange = () => {
updateSwitch(s, w);
c(s.checked);
})
))
);
updateSwitch(s, w);
return w;
}
function authorizeCustomizer() { /*function authorizeCustomizer() {
var endpoint = $api.internal.constants.API_HOST; var endpoint = $api.internal.constants.API_HOST;
var url = `https://${endpoint}/oauth2/authorize?client_id=436715820970803203&redirect_uri=https%3A%2F%2Fendpwn.cathoderay.tube%2Fauth%2Fdiscord%2Fintegratedcallback&response_type=code&scope=identify`; var url = `https://${endpoint}/oauth2/authorize?client_id=436715820970803203&redirect_uri=https%3A%2F%2Fendpwn.cathoderay.tube%2Fauth%2Fdiscord%2Fintegratedcallback&response_type=code&scope=identify`;
var win = new window.electron.BrowserWindow({ var win = new window.electron.BrowserWindow({
width: 420, width: 420,
height: 500, height: 500,
transparent: false, transparent: false,
frame: false, frame: false,
resizable: true, resizable: true,
nodeIntegration: true nodeIntegration: true
}); });
win.loadURL(url); win.loadURL(url);
} }
function submitCustomizer(d, b) { function submitCustomizer(d, b) {
fetch('https://endpwn.cathoderay.tube/set', { fetch('https://endpwn.cathoderay.tube/set', {
headers: { headers: {
'Content-type': 'application/json' 'Content-type': 'application/json'
}, },
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
id: $me(), id: $me(),
signature: $api.localStorage.get('customizer_signature'), signature: $api.localStorage.get('customizer_signature'),
discriminator: d, discriminator: d,
bot: b bot: b
}) })
}).then(r => { }).then(r => {
r.text().then(k => { r.text().then(k => {
$api.ui.showDialog({ $api.ui.showDialog({
title: 'Server Response', title: 'Server Response',
body: k body: k
});
}); });
endpwn.customizer.update();
}); });
endpwn.customizer.update(); }*/
}); function renderSettings(e) {
currentSection = e;
if ($("#ep_settings")) $("#ep_settings").remove();
} if (e.section == "ENDPWN") {
var pane = $(".content-column.default");
if (!pane) return;
function renderSettings(e) { //var needAuth = !$api.localStorage.get('customizer_signature');
currentSection = e; var content = createElement("div")
if ($("#ep_settings")) $("#ep_settings").remove(); .withId("ep_settings")
.withClass("flex-vertical")
if (e.section == "ENDPWN") {
var pane = $(".content-column.default");
if (!pane) return;
var needAuth = !$api.localStorage.get('customizer_signature');
var content = createElement('div')
.withId('ep_settings')
.withClass('flex-vertical')
.withChildren(
createElement("div")
.withClass('epSettingsHeader')
.withText('ΣndPwn Settings')
)
.appendTo(pane);
if (!$api.localStorage.get('customizer_signature')) {
createHorizontalPanel()
.withChildren( .withChildren(
createButton("Authorize EndPwn Customizer") createElement("div")
.modify(x => x.onclick = authorizeCustomizer) .withClass("epSettingsHeader")
.withText("ΣndPwn Settings")
)
.appendTo(pane);
/*if (!$api.localStorage.get('customizer_signature')) {
createHorizontalPanel()
.withChildren(
createButton("Authorize EndPwn Customizer")
.modify(x => x.onclick = authorizeCustomizer)
)
.appendTo(content);
}
else {
var discrim, bot;
createVerticalPanel()
.withChildren(
createH5('Discriminator'),
createHorizontalPanel()
.withChildren(
discrim = createInput(endpwn.customizer.me.discrim ? endpwn.customizer.me.discrim : '')
.withClass('epDiscrimField')
.modify(x => x.maxLength = 4),
createVerticalPanel()
.withChildren(
createH5('Bot?'),
bot = createSwitch(() => { }, endpwn.customizer.me.bot)
),
createButton("Submit")
.modify(x => x.onclick = () => submitCustomizer(discrim.value, bot.children[0].checked))
)
)
.appendTo(content);
}*/
createElement("div")
.withClass(panels.horizontal, "epButtonPanel")
.withChildren(
createButton("Open Data Folder").modify(
x =>
(x.onclick = () => {
electron.shell.openExternal($api.data);
})
),
createWarnButton("Restart in safe mode").modify(
x => (x.onclick = endpwn.safemode)
),
createDangerButton("Uninstall EndPwn").modify(
x => (x.onclick = endpwn.uninstall)
)
/*createButton("Toggle Customizer")
.modify(x => x.onclick = function(){
window.____customizerToggled = !window.____customizerToggled;
$api.localStorage.set("customizerToggled",window.____customizerToggled);
const restart = confirm("For toggle to be in full effect, you will need to refresh. Press \"OK\" to refresh or \"Cancel\" to refresh later on your own.");
if (restart){
window.electron.getCurrentWindow().reload();
}
})*/
) )
.appendTo(content); .appendTo(content);
} }
else {
var discrim, bot;
createVerticalPanel()
.withChildren(
createH5('Discriminator'),
createHorizontalPanel()
.withChildren(
discrim = createInput(endpwn.customizer.me.discrim ? endpwn.customizer.me.discrim : '')
.withClass('epDiscrimField')
.modify(x => x.maxLength = 4),
createVerticalPanel()
.withChildren(
createH5('Bot?'),
bot = createSwitch(() => { }, endpwn.customizer.me.bot)
),
createButton("Submit")
.modify(x => x.onclick = () => submitCustomizer(discrim.value, bot.children[0].checked))
)
)
.appendTo(content);
}
createElement("div")
.withClass(panels.horizontal, 'epButtonPanel')
.withChildren(
createButton("Open Data Folder")
.modify(x => x.onclick = () => { electron.shell.openExternal($api.data) }),
createWarnButton("Restart in safe mode")
.modify(x => x.onclick = endpwn.safemode),
createDangerButton("Uninstall EndPwn")
.modify(x => x.onclick = endpwn.uninstall)
)
.appendTo(content);
} }
$api.events.hook("USER_SETTINGS_MODAL_SET_SECTION", renderSettings);
$api.events.hook("USER_SETTINGS_MODAL_INIT", e =>
setTimeout(_ => renderSettings(e), 200)
);
} }
};
$api.events.hook("USER_SETTINGS_MODAL_SET_SECTION", renderSettings);
$api.events.hook("USER_SETTINGS_MODAL_INIT", e => setTimeout(_ => renderSettings(e), 200));
}
}

View File

@ -18,20 +18,17 @@
*/ */
var internal = { var internal = {
print: function(str) {
print: function (str) { console.log(`%c[EndPwn3]%c ` + str, "font-weight:bold;color:#0cc", "");
console.log(`%c[EndPwn3]%c ` + str, 'font-weight:bold;color:#0cc', '');
}, },
warn: function (str) { warn: function(str) {
console.warn(`%c[EndPwn3]%c ` + str, 'font-weight:bold;color:#0cc', ''); console.warn(`%c[EndPwn3]%c ` + str, "font-weight:bold;color:#0cc", "");
} }
};
}
exports = { exports = {
manifest: { manifest: {
replacements: [ replacements: [
// changelog injection // changelog injection
/*{ /*{
signature: /key:"changeLog",get:function\(\){return (\w)}/g, signature: /key:"changeLog",get:function\(\){return (\w)}/g,
@ -49,69 +46,69 @@ exports = {
signature: "window.GLOBAL_ENV.RELEASE_CHANNEL", signature: "window.GLOBAL_ENV.RELEASE_CHANNEL",
payload: "'staging'" payload: "'staging'"
} }
]
],
}, },
preload: function () { preload: function() {
window.reload = () => { app.relaunch(); app.exit(); }; window.reload = () => {
app.relaunch();
app.exit();
};
window.endpwn = { window.endpwn = {
// safemode // safemode
safemode: function () { safemode: function() {
$api.ui.showDialog({ $api.ui.showDialog({
title: 'EndPwn: safe mode', title: "EndPwn: safe mode",
body: 'This will restart your client in a state without plugin support.', body:
confirmText: 'Yes', cancelText: 'No', "This will restart your client in a state without plugin support.",
confirmText: "Yes",
cancelText: "No",
onConfirm: () => { onConfirm: () => {
$api.localStorage.set("safemode", 1);
$api.localStorage.set('safemode', 1);
window.electron.getCurrentWindow().reload(); window.electron.getCurrentWindow().reload();
} }
}); });
}, },
// uninstaller // uninstaller
uninstall: function () { uninstall: function() {
$api.ui.showDialog({ $api.ui.showDialog({
title: 'EndPwn: confirm uninstallation', title: "EndPwn: confirm uninstallation",
body: 'Are you sure you want to remove EndPwn from your client? You can reinstall it at any time.', body:
confirmText: 'Yes', cancelText: 'No', "Are you sure you want to remove EndPwn from your client? You can reinstall it at any time.",
confirmText: "Yes",
cancelText: "No",
onConfirm: () => { onConfirm: () => {
var data = $api.data; var data = $api.data;
$api.settings.set('WEBAPP_ENDPOINT'); $api.settings.set("WEBAPP_ENDPOINT");
$api.settings.set('WEBAPP_PATH'); $api.settings.set("WEBAPP_PATH");
$api.settings.set('UPDATE_ENDPOINT'); $api.settings.set("UPDATE_ENDPOINT");
reload(); reload();
} }
}); });
}, },
// endpwn customizer // endpwn customizer
customizer: krequire('customizer'), //customizer: krequire('customizer'),
// settings page stuff // settings page stuff
settings: krequire('settings'), settings: krequire("settings"),
// wrapper function for dispatch() // wrapper function for dispatch()
// intended to simplify using executeJavaScript() from other windows as a bad IPC method // intended to simplify using executeJavaScript() from other windows as a bad IPC method
// we do this since afaik we cant use electron.ipc in a useful way (maybe im wrong? if i am ill make this better later on lol) // we do this since afaik we cant use electron.ipc in a useful way (maybe im wrong? if i am ill make this better later on lol)
pseudoipc: function (e) { pseudoipc: function(e) {
$api.events.dispatch({ $api.events.dispatch({
type: 'ENDPWN_PSEUDO_IPC', type: "ENDPWN_PSEUDO_IPC",
data: e data: e
}); });
}, },
__eval: e => eval(e) __eval: e => eval(e)
}; };
// fetch the changelog // fetch the changelog
@ -125,79 +122,82 @@ exports = {
});*/ });*/
// early init payload // early init payload
document.addEventListener('ep-prepared', () => { document.addEventListener("ep-prepared", () => {
// disable that obnoxious warning about not pasting shit in the console // disable that obnoxious warning about not pasting shit in the console
internal.print('disabling self xss warning...'); internal.print("disabling self xss warning...");
$api.util.findFuncExports('consoleWarning').consoleWarning = e => { }; $api.util.findFuncExports(
"consoleWarning"
).consoleWarning = e => {};
// fuck sentry // fuck sentry
internal.print('fucking sentry...'); internal.print("fucking sentry...");
var sentry = wc.findCache('_originalConsoleMethods')[0].exports; var sentry = wc.findCache("_originalConsoleMethods")[0].exports;
window.console = Object.assign(window.console, sentry._originalConsoleMethods); // console window.console = Object.assign(
sentry._wrappedBuiltIns.forEach(x => x[0][x[1]] = x[2]); // other stuff window.console,
sentry._breadcrumbEventHandler = () => () => { }; // break most event logging sentry._originalConsoleMethods
sentry.captureBreadcrumb = () => { }; // disable breadcrumb logging ); // console
sentry._wrappedBuiltIns.forEach(x => (x[0][x[1]] = x[2])); // other stuff
sentry._breadcrumbEventHandler = () => () => {}; // break most event logging
sentry.captureBreadcrumb = () => {}; // disable breadcrumb logging
}); });
}, },
start: function () { start: function() {
// disable analytics // disable analytics
internal.print('disabling analytics...'); internal.print("disabling analytics...");
$api.util.findFuncExports("AnalyticEventConfigs").default.track = () => { }; $api.util.findFuncExports(
"AnalyticEventConfigs"
).default.track = () => {};
// enable experiments // enable experiments
internal.print('enabling experiments menu...'); internal.print("enabling experiments menu...");
$api.util.findFuncExports('isDeveloper').__defineGetter__('isDeveloper', () => true); $api.util
.findFuncExports("isDeveloper")
.__defineGetter__("isDeveloper", () => true);
// if we used start() in the other files, it would create a different instance -- we dont want that // if we used start() in the other files, it would create a different instance -- we dont want that
endpwn.customizer.init(); endpwn.customizer.init();
endpwn.settings.init(); endpwn.settings.init();
// check for epapi updates // check for epapi updates
if ($api.lite || !fs.existsSync($api.data + '/DONTUPDATE')) if ($api.lite || !fs.existsSync($api.data + "/DONTUPDATE"))
(function () { (function() {
internal.print('checking for EPAPI updates...'); internal.print("checking for EPAPI updates...");
// fetch the latest build of epapi // fetch the latest build of epapi
fetch('https://lambda.cynfoxwell.cf/epapi/epapi.js?_=' + Date.now()).then(x => x.text()).then(x => { fetch(
"https://lambda.cynfoxwell.cf/epapi/epapi.js?_=" +
Date.now()
)
.then(x => x.text())
.then(x => {
// check the version
if (kparse(x).version > $api.version) {
// if the version on the server is newer, pester the user
$api.ui.showDialog({
title: "EndPwn3: EPAPI Update Available",
body:
"An update to EPAPI has been released. It is recommended that you restart your client in order to gain access to new features and maintain compatibility.",
confirmText: "Restart Now",
cancelText: "Later",
// check the version // user pressed "Restart Now"
if (kparse(x).version > $api.version) { onConfirm: () => {
// refresh the page if we're running in a browser, reboot the app if we're running outside of lite mode
// if the version on the server is newer, pester the user reload();
$api.ui.showDialog({ },
title: 'EndPwn3: EPAPI Update Available',
body: 'An update to EPAPI has been released. It is recommended that you restart your client in order to gain access to new features and maintain compatibility.',
confirmText: 'Restart Now', cancelText: 'Later',
// user pressed "Restart Now"
onConfirm: () => {
// refresh the page if we're running in a browser, reboot the app if we're running outside of lite mode
reload();
},
// they pressed "Later", for some reason
onCancel: () => {
// bother them again in 6 hrs (* 60 min * 60 sec * 1000 ms)
setTimeout(arguments.callee, 6 * 60 * 60 * 1000);
}
// they pressed "Later", for some reason
onCancel: () => {
// bother them again in 6 hrs (* 60 min * 60 sec * 1000 ms)
setTimeout(
arguments.callee,
6 * 60 * 60 * 1000
);
}
});
} else setTimeout(arguments.callee, 6 * 60 * 60 * 1000);
}); });
})();
}
else setTimeout(arguments.callee, 6 * 60 * 60 * 1000);
});
})();
} }
} };