Refined-github: Upload icon missing

Created on 4 Apr 2018  路  7Comments  路  Source: sindresorhus/refined-github

bug good first issue help wanted

All 7 comments

@krlmlr just drag and drop or cntrl + V #750

I don't understand it: the icon is visible in #693!

screenshot from 2018-04-04 23-15-05

I'm happier with Ctrl + U, I tend to avoid file managers and the mouse but the "pick a file" dialog works for me.

Hey, I figured out the three problems with the upload button.

Problem 1: No upload button

GitHub doesn't send the markup for the toolbar in the response, the toolbar is added dynamically later to the form. addUploadButton() executes before the toolbar is even available, so no button.

Problem 2: Upload button on some pages

This happens for ajaxed pajes. The ajaxed pages do contain the markup for toolbar, so after ajaxedPagesHandler() call, the upload button is added to the form. This is the reason for @krlmlr seeing icon on the other page, because it being an ajax loaded page.

Problem 3: Broken upload button

Even if the button is added as in problem 2, the delegate() calls are invoked as addUploadBtn() is called in the ajaxedPagesHandler(), adding new listener for each back and forth ajax loads.


@bfred-it I already have a working solution, I'll send a PR if it is ok.

@notlmn go for it!

Thanks for looking into it, I don't remember seeing any problems with uploading content (and also forgot about Ctrl+U by now ;-) )

This is still broken for me. No upload button and no option to toggle (so far as I can see) to bring it back, how it was before. Uploading images is something that happens quite frequently, I doubt it's very beneficial for the add-on to hide that feature so much. Tons of people have zero reasons to hit Ctrl+U and that one shows the source code for me here in Firefox on Linux.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hkdobrev picture hkdobrev  路  3Comments

sindresorhus picture sindresorhus  路  3Comments

yakov116 picture yakov116  路  3Comments

MilesBHuff picture MilesBHuff  路  3Comments

olso picture olso  路  3Comments