Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login problem #8

Closed
ProximaNova opened this issue Feb 6, 2016 · 10 comments
Closed

Login problem #8

ProximaNova opened this issue Feb 6, 2016 · 10 comments

Comments

@ProximaNova
Copy link
Collaborator

When I am logged in then open the mass upload link I sometimes have to refresh the page 0-2 times for it to login (at &s=mass_upload).

@Seedmanc
Copy link
Owner

Seedmanc commented Feb 6, 2016

Weird, never happens to me. Is your booru any special?

Let's see if other users report the same.

@ProximaNova
Copy link
Collaborator Author

It is strange; there doesn't seem to be a pattern:
meme.booru.org - 2 refreshes (2nd test: 0)
redpill.booru.org - 1 refresh (2nd test: 3)
something else - 0 refreshed (2nd test: 0)

@Seedmanc
Copy link
Owner

Seedmanc commented Feb 6, 2016

Made some changes to the .user.js, dunno if they addressed the issue, but you're welcome to update and test it.

Did it happen on both FF and Chrome or you only have one installed?

@ProximaNova
Copy link
Collaborator Author

I am using Firefox. Also there is now this unintelligible text that says "You are to a site." above the upload button. And I think this glitch might have to do with previously mass uploading; I'll restart my computer and test again.

@Seedmanc
Copy link
Owner

Weird, that means the scripts in the injected page don't fire. I'm using mostly Opera and Chrome and it doesn't happen to me. There's a slight delay between page injection and scripts working, but they never fail to.

I tried it in FF now and the first time it indeed happened like you said, but after a refresh all went to normal and I couldn't reproduce it anymore. I don't even know if you can debug userscripts in FF, I wasn't able to last I tried.

@ProximaNova
Copy link
Collaborator Author

Since it doesn't recognize the login status instantly in FF this part in index.html displays "You are to a site." instead of "You are [login status] to a [booru type] site."

<p style="text-align:center;margin-top:-1em;margin-bottom:-0.33em;">
You are <span class="bold" id="loggedIn"></span> to a <span class="bold" id="current"></span> site.
</p>

For the above code snippet: is the bold class acted upon by anything other than the CSS ("font-weight:bold;")? I changed it to:

You are <b id="loggedIn"></b> to a <b id="current"></b> site.

@Seedmanc
Copy link
Owner

Nah, it's just seeing <b> with stuff like ids is really weird for me. At my work they do everything with classes, even simply bolding text.

I wish there was stuff like CSS optimizer that would analyze both CSS and HTML structure to simplify them, but I only know separate approaches.

@Seedmanc
Copy link
Owner

Uploader now shows a spinner during scripts' loading and disables the upload button until they're active.

@Seedmanc
Copy link
Owner

Seedmanc commented Mar 9, 2016

Perhaps this issue is related to #10 where entire page fails to load.

There's a trick with loading scripts in imported page, when you simply insert the page acquired from some source, its inbuilt scripts don't fire normally. Therefore I loop through page's text reinserting them, which causes them to launch (https://github.com/Seedmanc/Booru-mass-uploader/blob/gh-pages/booru.mass.uploader.user.js#L38) Maybe debugging that part of code would help, but >FF >debugging userscripts

@Seedmanc
Copy link
Owner

The issue was due to the indeterminate order of scripts loading. The recent update should fix it for good https://github.com/Seedmanc/Booru-mass-uploader/raw/gh-pages/booru.mass.uploader.user.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants