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

One chance that use local icon #5

Merged
merged 1 commit into from Mar 16, 2017
Merged

One chance that use local icon #5

merged 1 commit into from Mar 16, 2017

Conversation

@yancya
Copy link
Contributor

yancya commented Mar 16, 2017

  1. img フォルダに GitHub ID 名の icon ファイルを置いておく
  2. 最初は img フォルダのファイルを img.src に設定する
  3. 無かったら onerror フックで https://avatars.githubusercontent.com から取得し直す
@yancya
Copy link
Contributor Author

yancya commented Mar 16, 2017

コンソールにエラーメッセージが出ちゃうのが玉に瑕

@yancya
Copy link
Contributor Author

yancya commented Mar 16, 2017

http じゃないと fetch 使えないので、あとはこれしか思いつかない

@amatsuda
Copy link
Member

amatsuda commented Mar 16, 2017

うむー、これかー。 http://stackoverflow.com/questions/7035466/check-if-file-exists-but-prevent-404-error-in-console-from-showing-up
どうしようも無さそうなんでこれで良いんじゃないでしょかー。

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.