Giter VIP home page Giter VIP logo

Comments (11)

williamparry avatar williamparry commented on June 14, 2024

In the console of that page could you type:

model.authenticated.fetchUser()

It should return you an object like this:

{id: 12345, url: "williamparry", bio: null, reputation: 71, created: 12345} 

I'd like to know if your "url" property is being returned properly.

from imgur-extension.

jmlind avatar jmlind commented on June 14, 2024

Yep, looks like the url is returning properly. Scrubbed output:

{id: 12345, url: "lowriskFF", bio: null, reputation: 26, created: 12345}

from imgur-extension.

williamparry avatar williamparry commented on June 14, 2024

Can you try this now?

model.authenticated.getAccount()

Testing whether it gets stored properly or not. You should be able to go:

model.authenticated.getAccount().url

And have your username returned.

Are there any console errors?

from imgur-extension.

jmlind avatar jmlind commented on June 14, 2024

Yep, model seems to be stored properly (everything matches), and the username is returned as expected. No console errors.

from imgur-extension.

williamparry avatar williamparry commented on June 14, 2024

Hum. See, this is the code:

var defaultAlbumOpt = UTILS.DOM.create('option');
defaultAlbumOpt.value = '_userAlbum';
defaultAlbumOpt.text = model.authenticated.getAccount().url;
ENavSelect.appendChild(defaultAlbumOpt);

What version of Chrome are you running?

from imgur-extension.

jmlind avatar jmlind commented on June 14, 2024

Chrome version 26.0.1410.64 m.

Also, I just thought to close the extension page and reload it -- album is now named correctly. Seems to be only contained in the time after authenticating with imgur.com and before reloading the extension page.

from imgur-extension.

williamparry avatar williamparry commented on June 14, 2024

I cleared authentication, re-authenticated and it worked fine for me. Although, I do remember that when I was creating albums through the UI, there was a delay in the name being returned (which is why I took it out). Strange that it didn't disappear when you refreshed the page.

[Edit] Just saw that it did fix itself on reload. This might be an API delay issue.

I can't reproduce, but I'll leave this open in case something comes to mind. Thanks!

from imgur-extension.

jmlind avatar jmlind commented on June 14, 2024

Yeah, that is a bit strange. I just reinstalled the extension to test again. Once I authenticate, it just has "-this computer-" and "undefined". When I refresh the extension page, it has those two, plus my other albums from imgur.com. It keeps the "undefined" even when I close down the extension page.

It is correctly updated to my username when I tell it to fetch the user again:

model.authenticated.fetchUser()

And then refresh the extension page.

from imgur-extension.

williamparry avatar williamparry commented on June 14, 2024

It was listening for EVENT_SUCCESS but all that was registered was EVENT_COMPLETE.

I've updated the model to fire EVENT_SUCCESS.

Could you clear authentication, reload the app from the extensions page and try again?

from imgur-extension.

jmlind avatar jmlind commented on June 14, 2024

Works just fine on a fresh install!

from imgur-extension.

williamparry avatar williamparry commented on June 14, 2024

Hot sauce.

from imgur-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.