The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

8. November 2011, 15:28:30

Custom favicons?

Some sites don't show it favicon for some reason.
Others I would like to change maybe?

How do I change favicons to a specific site.

9. November 2011, 13:43:41

daisensou

Posts: 37

I'm sure theres a smoother, better way to do it, but if you just want to change the tab favicon to easily identify a website, than copy this code and save it as younameit.user.js inside your Opera javascript folder (need info? Follow http://userjs.org/help/installation)

// ==UserScript==
// @name            test
// @description     test
// @include         *my.opera.com/*
// ==/UserScript==

var newLink = document.createElement('link');
newLink.setAttribute('rel','icon');
newLink.setAttribute('href','data:image/ico;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJySURBVHjapFJNi1JhFL7XO46KX4iGCiUKCSnkULSQiRhBcEpEN4GWIC6SEdyIC2GYfyDkrkU7cVGLAWuRMkmroE2NQtEsAhcWpvgxmF7Fr6vO8wqKNrObA4dz3/c+7znPec6h5/M5dR3jUde0rasu4/H4IwQXj8e7D4YEM0IsIL5LJBKn61h6vQU8FCAc8vn8PbVaXZfJZNsmk6krFAqHuVxO2+/3ZePx+ASYl0jEXWJA0/SRWCy+ZzQaz+v1+na1WhW12+0zjuN6s9nsllarZXH3GGdSNbGhQSwW2wXood/vP8PxV6/XUzAMI2w2m1aFQiHxer0/IpHIicViaQD3BPidDQYCgeA5aPcymcwpHoWVSiU1mUwoPGj6fL7PgPyE1+x2e6NQKBygrWc4f18x6HQ6d0ajEVupVF5AA2Y6nS4SACwJhUI0vE5wKpXqg8FgOAfDu6sWAoGAYDAYMBCIw0+21WrNkYiCaBRElqKVQyR/DZwI8CE0+I0EolWCdDo9Q8UZSRCNRjPJZLLodDr/dLvdKWEhEi2wt8HsAfloNBozJOXWRZxoNJpuqVTSejyeY0ziyOVyvcLdP5ZlKVSnIByF+10ChkYaTKS9MQVU/EZoAXhAFgf+tVwu02BFDYdDCrRJOzeB20N7OsQvG1Ow2WxvisXiTj6ff+pwOCRkWaC0QiqVLsQkCwc2GrJobre7ZrVaj/9fpHI4HH6LPn3ZbHYfa6xDnzT5QaoTJhBVidb+BoPBNBnppVWGMfB9MHGnUilZrVa7gba25HL5RK/X9zGFqtlsfg/MJ/j8qgRL08HtcANcStaEMIR/XFZe2oUAAwB/ekBKaBd4YgAAAABJRU5ErkJggg==');
document.querySelector('head').appendChild(newLink);
void(0);


After this thread is loaded (or any other page from my.opera.com) the favicon should change from the red O to a globe.

Now, create a new script file and:

- Change *my.opera.com/* to the desired website you want to change\add a favicon

- Use an online base64 converter (like http://www.motobit.com/util/base64-decoder-encoder.asp), to convert any 16x16 pixels images to a string (be sure to make it a single line!) and then add it after image/xxx;base64, (xxx in this case, stands for the file format, ico\jpg\gif or png)

That should do it. Btw, nice avatar\username combo!

10. November 2011, 21:48:50

Thanks its working.
Took some time, but its working.

Forums » General Opera topics » Customizing Opera