Compare commits
2 Commits
v0.0.3
...
01aa8eba44
Author | SHA1 | Date | |
---|---|---|---|
01aa8eba44 | |||
594e53b38f |
@@ -9,17 +9,15 @@ var changeIcon = function(color, currentIcon) {
|
|||||||
var img = new Image();
|
var img = new Image();
|
||||||
|
|
||||||
if (currentIcon && typeof(currentIcon) !== 'undefined' && currentIcon !== null && currentIcon !== 'undefined') {
|
if (currentIcon && typeof(currentIcon) !== 'undefined' && currentIcon !== null && currentIcon !== 'undefined') {
|
||||||
console.log(currentIcon);
|
|
||||||
img.src = currentIcon;
|
img.src = currentIcon;
|
||||||
} else {
|
} else {
|
||||||
img.src = 'data:image/x-icon;base64,AAABAAEAEBACAAEAAQCwAAAAFgAAACgAAAAQAAAAIAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA';
|
img.src = 'data:image/x-icon;base64,AAABAAEAEBACAAEAAQCwAAAAFgAAACgAAAAQAAAAIAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA';
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(img.src);
|
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
ctx.drawImage(img, 0, 0);
|
ctx.drawImage(img, 0, 0);
|
||||||
ctx.fillStyle = color;
|
ctx.fillStyle = color;
|
||||||
ctx.fillRect(0, 0, 2, 16);
|
ctx.fillRect(0, 0, 3, 16);
|
||||||
|
|
||||||
var link = document.createElement('link');
|
var link = document.createElement('link');
|
||||||
link.type = 'image/x-icon';
|
link.type = 'image/x-icon';
|
||||||
|
BIN
src/screenshots/firefox.png
Normal file
BIN
src/screenshots/firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 257 KiB |
Reference in New Issue
Block a user