Greasy Fork is available in English.

Tweak GitHub Icon

Tweak the icon of GitHub's website into white color & transparent background for better contrast on dark tab backgrounds etc. , especially for dark-themed browser. White, dark and black colors as well as white, dark, black and transparent backgrounds are all predifined in case of you need to modify them. Require SVG icon support.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
개발자
Crystal-RainSlide
일일 설치수
0
총 설치수
262
평점
2 0 0
버전
1.1
생성
2019-11-19
갱신
2022-01-12
라이선스
blessing
동작 사이트

By implementation, this script should have no control on the page icons of browser bookmarks.

How to change the colors

Use those predifined varibles:

white_color
dark_color
black_color

white_background
dark_background
black_background
transparent_background

to replace the two arguments inside the function in the right side of the euqal sign at the end of this script:

document.head.querySelector('[rel="icon"]').href =
    getSVGDataURL( white_color, transparent_background );

For example, if we want black color and white background:

document.head.querySelector('[rel="icon"]').href =
    getSVGDataURL( black_color, white_background );

SVG source code based on https://github.githubassets.com/pinned-octocat.svg , all the rights belong to GitHub.Inc .

The so called "dark color" is #191717 #191717 in the link above.