commit 70f9eb6e4d60083f9256a33d1be53e92ab8bc8f1
parent 3e9d96441f47f528cf7888a7f9ffe3709dc806ef
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Tue, 15 Nov 2016 21:18:40 +0100
Fix bug
Diffstat:
| M | screencap_intel.js | | | 73 | +++++++++++++++++++++++++++++++++++++------------------------------------ |
1 file changed, 37 insertions(+), 36 deletions(-)
diff --git a/screencap_intel.js b/screencap_intel.js
@@ -125,48 +125,49 @@ function login(l, p) {
window.setTimeout(function () {
if (!document.getElementById('Passwd')){
firePlainLogin(l, p)
- }
- page.evaluate(function (p) {
- document.getElementById('Passwd').value = p;
- }, p);
- if(document.querySelector("#next")){
- page.evaluate(function () {
- document.querySelector("#next").click();
- });
}else{
- page.evaluate(function () {
- document.querySelector("#signIn").click();
- });
- }
- page.evaluate(function () {
- document.getElementById('gaia_loginform').submit();
- });
- window.setTimeout(function () {
- if (page.url.substring(0,40) === 'https://accounts.google.com/ServiceLogin') {
- quit('login failed: wrong email and/or password');
- }
-
- if (page.url.substring(0,40) === 'https://appengine.google.com/_ah/loginfo') {
+ page.evaluate(function (p) {
+ document.getElementById('Passwd').value = p;
+ }, p);
+ if(document.querySelector("#next")){
+ page.evaluate(function () {
+ document.querySelector("#next").click();
+ });
+ }else{
page.evaluate(function () {
- document.getElementById('persist_checkbox').checked = true;
- document.getElementsByTagName('form').submit();
+ document.querySelector("#signIn").click();
});
}
+ page.evaluate(function () {
+ document.getElementById('gaia_loginform').submit();
+ });
+ window.setTimeout(function () {
+ if (page.url.substring(0,40) === 'https://accounts.google.com/ServiceLogin') {
+ quit('login failed: wrong email and/or password');
+ }
- if (page.url.substring(0,44) === 'https://accounts.google.com/signin/challenge') {
- twostep = system.stdin.readLine();
- }
+ if (page.url.substring(0,40) === 'https://appengine.google.com/_ah/loginfo') {
+ page.evaluate(function () {
+ document.getElementById('persist_checkbox').checked = true;
+ document.getElementsByTagName('form').submit();
+ });
+ }
- // if (twostep) {
- // page.evaluate(function (code) {
- // document.getElementById('totpPin').value = code;
- // }, twostep);
- // page.evaluate(function () {
- // document.getElementById('submit').click();
- // document.getElementById('challenge').submit();
- // });
- // }
- window.setTimeout(afterPlainLogin(IntelURL, search), loginTimeout);
+ if (page.url.substring(0,44) === 'https://accounts.google.com/signin/challenge') {
+ twostep = system.stdin.readLine();
+ }
+
+ // if (twostep) {
+ // page.evaluate(function (code) {
+ // document.getElementById('totpPin').value = code;
+ // }, twostep);
+ // page.evaluate(function () {
+ // document.getElementById('submit').click();
+ // document.getElementById('challenge').submit();
+ // });
+ // }
+ window.setTimeout(afterPlainLogin(IntelURL, search), loginTimeout);
+ }
}, loginTimeout)
}, loginTimeout / 10);
},