Welcome to Gaia! :: View User's Journal | Gaia Journals

 
 

View User's Journal

User Image - Blocked by "Display Image" Settings. Click to show.
Greasemonkey Item Search
More Greasemonkey fun. One problem I have with my avatar is that I have a billion items, and I can't locate them even if I know the name.

The catch is my inventory is so messed up, there is no logical order to anything. So I know I want to wear my Horns of the Demon, but I can't see them inside my Hats tab. It's like finding my keys.

I wrote this Greasemonkey script (in jQuery 'cos I like it) which adds a search box. Type the item name, it'll highlight the items to make them easily visible.

Find the script here

The catch is, it'll only check tabs you've already loaded. The way Gaia works is that each tab's items are only loaded when you click the tab icon. To stay simple, it'll only check the source currently loaded (no excess calls to Gaia).

It isn't perfect, but it does what I want, highlighting the needle in the haystack.






User Comments: [7] [add]
Mindset
Community Member
avatar
commentCommented on: Fri Mar 19, 2010 @ 06:11pm
Love this! I have the same problem and was thinking of making something like this myself. (I've had to go to View Source and run a search there to find stuff sometimes.) I might come back with some feedback after I test this out a bit. smile


commentCommented on: Fri Mar 19, 2010 @ 06:49pm
Having tried it out, I love it! But two problems:

1) Not sure I like its location below the pose etc. buttons and above the nekkid button. Perhaps to the right of the Outfits section would be best?

2) It's case-sensitive. I tried "pietro" and got nothing, "case" just turned up a briefcase, and wasn't till I tried "Case" or "Pietro" that I found the item I keep overlooking. Not a major problem but sort of annoying.

And this isn't a problem per se, but any way to move focus to the highlighted item? This of course wouldn't work for multiple items, but maybe if just one item was found...



Mindset
Community Member
Sweet n Leo
Community Member
avatar
commentCommented on: Sat Mar 20, 2010 @ 12:08am
Oh, neat ideas smile

I did try to have it switch to the tab (and focus on the item) if only one was found, but I've run into a bit of difficulty with Gaia using the Yahoo API and me using jQuery (I'm lazy and I like it) so the scope issue comes up.

Yeah, I don't like the positioning either xD Next to the outfit tabs sounds like a great spot actually.

Thanks for the feedback & ideas!


commentCommented on: Sat Mar 20, 2010 @ 01:18am
Switching to the tab isn't that important to me - generally I have some idea where the item is. I admit it's sometimes kind of hard for EIs or MCs that could be anywhere, but that's why I try to organize my inventory to keep those up top. (I haven't in a while, which is why my Case and other recent EIs are so blasted hard to find.)

But if you could ever figure out a way to do that, it would be awesome anyway. smile

As for the location, I fiddled with the script a bit, and found that changing the .before to .after (that is, putting it after the get nekkid section) really looks good to me. So that's an alternate position if the right-of-the-Outfits thing is hard to work with...

And everyone loves jQuery. I use it everywhere I can now, it saves so much time. smile



Mindset
Community Member
Sweet n Leo
Community Member
avatar
commentCommented on: Sat Mar 20, 2010 @ 02:16am
Had to change how I loaded jQuery, greasemonkey had some issues with accessing the DOM with jQuery using the way to include the library (ironically, the way they get you to include the library, with @require, doesn't fully work with the page).

It does mean I've restricted myself, since I can't access the GM functions now, but I wasn't using them anyway so it wasn't a major loss.

Rewrote the search code completely, so it isn't case-sensitive now.

The tab switching thing, I did think I could do it with the jQuery .trigger('click') function, to activate whatever Gaia has, but that's not working. I've not figured out how it's triggered really.

However I have added classes to the tabs, so they change color/bold/underline so you can see exactly what tab the items are on.

Added a scroll, so if the tab you're on is the one with the items in it, the panel will jump down to them. Obviously doesn't work if you're not on the same tab, simply because of the previous (not figured out how to switch tabs).

Anyway, feedback/ideas are loved smile


commentCommented on: Sat Mar 20, 2010 @ 02:25am
Ah ha ha. I failed at uploading, since I kept leaving in my test alerts xD Should be up now.



Sweet n Leo
Community Member
Sweet n Leo
Community Member
avatar
commentCommented on: Sat Mar 20, 2010 @ 02:41am
Ok, last update for today.

I've moved the search box to the space right next to the outfits tab. Also added a on-screen message to show how many were found.

To do: Change the "no items found" alert into a message on screen (alerts suck). But not today, need a break xD


User Comments: [7] [add]
 
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum