Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pr1sm committed Nov 12, 2018
1 parent 5ce089a commit 1009427
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions frontend/lib/_electron/windowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,10 @@ class WindowManager {
if (!this._context.captchaServerManager.isRunning) {
console.log('[DEBUG]: Starting captcha server...');
this._context.captchaServerManager.start();
// TODO: Change to use destructuring?
// (Might have to add a public getter to CSM)
serverPort = this._context.captchaServerManager.port;
}
w = await createCaptchaWindow();
this._captchas.set(w.id, new CaptchaWindowManager(this._context, w, this._context._session.fromPartition(`${w.id}`)));
console.log(`size after creating: ${this._captchas.size}`);
console.log(`[DEBUG]: Loading captcha with url: http://127.0.0.1:${serverPort}/captcha.html`);
w.loadURL(`http://127.0.0.1:${serverPort}/captcha.html`);
}
break;
Expand Down
11 changes: 0 additions & 11 deletions frontend/public/js/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ function submitCaptcha() {
}

function _registerStartHandler(ev, runnerId, siteKey) {
// TODO: Remove this!
console.log(`[DEBUG]: Starting token on site: ${siteKey} for runner: ${runnerId}`);
_runnerId = runnerId;
_siteKey = siteKey;
const script = document.createElement('script');
Expand All @@ -30,25 +28,16 @@ function _registerStartHandler(ev, runnerId, siteKey) {
}

function _registerStopHandler(ev, runnerId, siteKey) {
console.log(window.grecaptcha);
// TODO: Remove this!
console.log(`[DEBUG]: Stopping token on site: ${siteKey} for runner: ${runnerId}`);
window.grecaptcha.reset();
window.Bridge.refreshCaptchaWindow();

// TODO: Check if runner/sitekey match what we have
}

function registerForCaptchaEvents() {
// TODO: Remove this!
console.log('[DEBUG]: Registering for captcha events...');
window.Bridge.Captcha.start.register(_registerStartHandler);
window.Bridge.Captcha.stop.register(_registerStopHandler);
}

function deregisterForCaptchaEvents() {
// TODO: Remove this!
console.log('[DEBUG]: Deregistering for captcha events...');
window.Bridge.Captcha.start.deregister(_registerStartHandler);
window.Bridge.Captcha.stop.deregister(_registerStartHandler);
}
Expand Down

0 comments on commit 1009427

Please sign in to comment.