How to set your icon with LibraryThing MyIcon

CharlasHacking LibraryThing

Únete a LibraryThing para publicar.

How to set your icon with LibraryThing MyIcon

Este tema está marcado actualmente como "inactivo"—el último mensaje es de hace más de 90 días. Puedes reactivarlo escribiendo una respuesta.

1brightcopy
Ene 16, 2010, 1:34 pm

Collectorator asked how to set the icon for aethercowboy's LibraryThing MyIcon script. All you need to do is enter a URL when first prompted by the script. For example, I saved your user icon, resized it to 16x16 and uploaded it to imageshack. So when it prompts you for your icon, enter:

http://img5.imageshack.us/img5/9890/collectoratorc.jpg

Hey aethercowboy - You should put in a submenu that causes the prompt to come up again. Right now there's no good way for someone to change their icon. I'm sure you didn't do it before because it was mainly for you and you know how to use about:config. :)

2brightcopy
Ene 16, 2010, 2:17 pm

Oh, and btw aethercowboy, you got bit by the same "feature" I did. You need to add "http://www.librarything.com/talktopic*" to the Included Pages for any script that modifies talk pages. When you click on the link, you go to a page with the URL form "http://www.librarything.com/topic/*". But when you click in the cell near a link but not actually on it, you get a URL of the form "http://www.librarything.com/talktopic*". Probably just some cruft LT has never noticed or cared enough to change.

3Collectorator
Ene 16, 2010, 2:29 pm

Este miembro ha sido suspendido del sitio.

4Collectorator
Ene 16, 2010, 2:30 pm

Este miembro ha sido suspendido del sitio.

5brightcopy
Ene 16, 2010, 3:09 pm

You can use anything that would normally display in your browser. Most browser can display gifs and jpgs. Most newer ones png, too. Ico is less common. When in doubt, just try to open it in the browser.

If you want to change it right now without him adding the option, enter about:config in your browser url bar. Then type
myicon.favicon
in the search bar. That should bring up one result. You can right click on it and edit it right there, or choose reset and the script will prompt you next time.

6brightcopy
Ene 16, 2010, 4:24 pm

aethercowboy:

Just for fun (and as part of learning the GM menu command api), I went ahead and whipped up a function. All you need to do is stick it somewhere after you've defined xFavicon.

GM_registerMenuCommand('Reset Favicon', function() {
GM_deleteValue(xFavicon);
window.location.reload();
});

7Collectorator
Ene 16, 2010, 5:12 pm

Este miembro ha sido suspendido del sitio.

8brightcopy
Ene 16, 2010, 7:39 pm

You to edit the image using some image editing software (if you're on Windows, you should at least have something called Paintbrush somewhere if you search for it).

You don't have to upload it. But the syntax is a little trickier for files on your local machine.

If you had a file that was at:
C:\temp\thing.gif

You would need to enter:
file:///C:/temp/thing.gif

There's no great way for his script to let you browse for a local file using Greasemonkey scripts. You can do it, but it's a whole lot of trouble.

9Collectorator
Ene 16, 2010, 7:48 pm

Este miembro ha sido suspendido del sitio.

10brightcopy
Ene 16, 2010, 7:54 pm

16x16

11Collectorator
Ene 16, 2010, 7:55 pm

Este miembro ha sido suspendido del sitio.

12Collectorator
Ene 16, 2010, 8:00 pm

Este miembro ha sido suspendido del sitio.

13brightcopy
Ene 16, 2010, 8:05 pm

I know it because I looked at the script code. ;)

var xSize = 16;
image.setAttribute("height", xSize);
image.setAttribute("width", xSize);

If you wanted to learn some mad skillz, you could actually increase that value in the code to give yourself a bigger icon. Just choose Manage Scripts under the monkey icon. Find the LT MyIcon script in the list on the left, then click the Edit button below that. It should open the script in a text editor. Edit it and save it. Then reload the LT page and your results (for better or worse!) should have taken effect.

Good luck!

14Collectorator
Ene 16, 2010, 8:14 pm

Este miembro ha sido suspendido del sitio.

15aethercowboy
Ene 18, 2010, 9:52 am

Bugs noted. I'll roll out an update soon!

16aethercowboy
Editado: Ene 18, 2010, 9:57 am

Do my updates work? I ask myself before I deploy?

Still testing....

17aethercowboy
Ene 18, 2010, 10:01 am

Fixed, I think.

http://sites.google.com/site/jacobsilvia/code/ltmyicon.user.js

Let me know of any more bugs/problems/feature requests. Or you can do it yourself (it IS in the CC :)).

Sorry for the long delay. I don't normally visit LT on the weekends. Playing Spore...

To reset the image (thanks to jpierce):

Tools > Greasemonkey > User Script Commands > Reset Favicon