Jump to content

Need some help with jQuery and making chrome extensions.

A.D.A.M

So here's what I'm tryna do: I'm trying to make a script to click the login button or submit a form for a website so I don't need to click log in every time I open the site since that particular website log you out after a session expires.

Here's the code I currently have :

post-66999-0-85344900-1443253035_thumb.p

 

Currently what is does is infinitely refreshing the page and the website says "Invalid login please try again". (Have the assumption that its a loop error or something ).

Sometimes if you randomly click the page(not button) it somehow logs in.

Some help directed to what I need to do would be helpful. 

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

So here's what I'm tryna do: I'm trying to make a script to click the login button or submit a form for a website so I don't need to click log in every time I open the site since that particular website log you out after a session expires.

Here's the code I currently have :

attachicon.gifde.png

 

Currently what is does is infinitely refreshing the page and the website says "Invalid login please try again". (Have the assumption that its a loop error or something ).

Sometimes if you randomly click the page(not button) it somehow logs in.

Some help directed to what I need to do would be helpful. 

have you tried the "inspect element" console? maybe that gives more information about the error

Link to comment
Share on other sites

Link to post
Share on other sites

have you tried the "inspect element" console? maybe that gives more information about the error

Justa bunch of stuff flashing purple specifically something called pformusername numspan and the password counterpart, also discovered that i'f i press a key on the keyboard like "k" or arrowup it logs in.

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

Anybody proficient in jQuery willing to give a hand? 

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

you just trigger button click, and login data are already there remembered by browser? My guess is that those login data aren't loaded yet when you start your script, so you trying to send empty login form, try to log what is inside those inputs (login, password) when you are triggering button click.

 

Ps. checking if button exists and then triggering click would be neat, cause if tehre is no login button -  there is no things to do (you're logged in)

Link to comment
Share on other sites

Link to post
Share on other sites

you just trigger button click, and login data are already there remembered by browser? My guess is that those login data aren't loaded yet when you start your script, so you trying to send empty login form, try to log what is inside those inputs (login, password) when you are triggering button click.

Ps. checking if button exists and then triggering click would be neat, cause if tehre is no login button - there is no things to do (you're logged in)

Oh I'll try this and let you know how well it goes.

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

@Mr_KoKa

so if set the password/ username value by myself in jQuert it works, but ill work on it a bit more so it doesn't need to this

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

Well this is normal.

You are trying to login on website but u dont have user/pass.

You need to add:

$("#user").value("UrUsername");

$("#pass").value("YourPass");

Then you can trigger login button click.

Link to comment
Share on other sites

Link to post
Share on other sites

Or you can wait for data to appear and then send form, you can check if login button / input fields exists, if it does then read input fields values if they're empty than wait a little bit and try again.

 

If there is no login button do nothing.

Link to comment
Share on other sites

Link to post
Share on other sites

Well this is normal.

You are trying to login on website but u dont have user/pass.

You need to add:

$("#user").value("UrUsername");

$("#pass").value("YourPass");

Then you can trigger login button click.

Mhmm yh I did that according to koka's suggestion, and i know that works.I thought the values would already be there seeing that my browser is set to remember the login details... gonna work on it a bit more, see if there is a way to do the same without having to assign a value

Intel i7 4702MQ| Nvidia GTX 850M| Kingston 16GB DDR3 1600Mhz| Acer VA70_HW (mobo)| 1TB WD Blue| MATSHITA DVD-RAM UJ8E0|1600x900 display|Win 8.1

Intel i5 4690K @Stock| Sapphire 390 Nitro| Hyper X Fury 2x4GB| MSI SLI Krait z97| Noctua Nh-U12S | 850 EVO 256GB| 2TB WD Black | CM V 850w| Enthoo Luxe

If you want to tag me or any person with periods do: @[Member='Name]

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×