How to set your icon with LibraryThing MyIcon
DiscussãoHacking LibraryThing
Aderi ao LibraryThing para poder publicar.
Este tópico está presentemente marcado como "adormecido"—a última mensagem tem mais de 90 dias. Pode acordar o tópico publicando uma resposta.
1brightcopy
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. :)
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
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
My poor little shrunken mule! What I was really asking though,was whether it had to be an .ico file, or if it could be a .gif file. You've made a .jpg, so now I guess I can use anything?
To change it, I think I'll just turn it off and then turn it back on.
To change it, I think I'll just turn it off and then turn it back on.
4Collectorator
Nope. That doesn't work. Will have to wait for the cowboy.
5brightcopy
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.
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
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();
});
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
All right, I edited through about:config. But my image is distorted. I need to change the pixel size in the code. I wonder where dat is.
Oh, and a question I had from earlier is must I upload the image to the web, then provide that path to the script? That's what I've been doing, because there isn't a browse yer files button.
Oh, and a question I had from earlier is must I upload the image to the web, then provide that path to the script? That's what I've been doing, because there isn't a browse yer files button.
8brightcopy
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.
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
I know how to edit an image, I just don't know what size the script wants.
It's no problem uploading to the web.
It's no problem uploading to the web.
10brightcopy
16x16
11Collectorator
But how do you know that?
12Collectorator
ewww. Animated ones are bad.
13brightcopy
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!
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
Ahhh. Ok. I'm all set. I left it at 16 because that's good. Now I have a nice colored box. (silly smile)
Thanks for all your help, jpierce!
Thanks for all your help, jpierce!
15aethercowboy
Bugs noted. I'll roll out an update soon!
16aethercowboy
Do my updates work? I ask myself before I deploy?
Still testing....
Still testing....
17aethercowboy
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
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