Conquer Club

Greasemonky Script - Saved Searchs

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

Postby Selin on Mon Aug 20, 2007 1:29 pm

This script is not working fully anymore. Can someone fix it?

On the game finder menu you had the option to save your frequently used searchs, i.e. you could save a search "active, TOP 250", name it, and you automatically got all active games of tournament TOP 250 in 1 click by choosing that specific saved search.
Now it's partially working; the options to enter a partial match/ or a tournament name in saved searchs don't work. If you don't use partial match/or tournament fields, a saved search with all other options is working, e.g. a saved search with options "waiting, flat rate, standard...." does work.

I'm not sure, if I could explain it correctly. Is it clear?
Brigadier Selin
 
Posts: 1100
Joined: Wed Oct 04, 2006 7:56 am
Location: Istanbul, Turkey

Script Problem explained

Postby Aerial Attack on Tue Aug 21, 2007 10:03 pm

The saved searches no longer work for "tournament" games.

This is because previously there was only a text box to do partial matches against game titles.

Now that there is a drop-down box (holding the tournament names), the script needs to be able to remember the dropdownbox.selectedvalue (NOT .selectedId ?)

Hope that explains it a little better.

EDIT: I took a look at both the Game Finder page source and the saved searches script. The script is only checking all of the input fields (text, checkbox, etc.). Meanwhile, the dropdown box is actually a select field. This means that updating will require a bit more than just 2 or 3 new lines of code to adjust. My javascript is REALLY rusty - so, I couldn't quite make it work [plus, I have no place to host the updated code].
Last edited by Aerial Attack on Wed Aug 22, 2007 2:45 pm, edited 1 time in total.
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Re: Script Problem explained

Postby Selin on Wed Aug 22, 2007 11:01 am

Aerial Attack wrote:The saved searches no longer work for "tournament" games.

This is because previously there was only a text box to do partial matches against game titles.

Now that there is a drop-down box (holding the tournament names), the script needs to be able to remember the dropdownbox.selectedvalue (NOT .selectedId ?)

Hope that explains it a little better.


That's an explanation, not a solution :)

.
Brigadier Selin
 
Posts: 1100
Joined: Wed Oct 04, 2006 7:56 am
Location: Istanbul, Turkey

Potential Solution?

Postby Aerial Attack on Thu Aug 30, 2007 2:13 am

NOTE: I have not tested this code in any way shape or form.

I have added a few lines to the LoadSearch and SaveSearch event handlers. These have been commented out, but you may comment them back in for testing purposes/usage.

// The Save Button Handler
var saveButtonHandler = function saveButtonHandler()
{
var name= prompt("Please Name this search (reusing a name will overwrite it)",loadedName);
if (name!="" && name != null)
{
var searchDetails=new Object();
var allP = document.getElementById('middleColumn').getElementsByTagName("input");
// var count = 0;
// var tourney = document.getElementById('middleColumn').getElementsByTagName("select");
for( i in allP )
{
if(allP[i].type=="checkbox")
{
searchDetails[allP[i].id] = allP[i].checked;
}
if(allP[i].type=="text")
{
searchDetails[allP[i].id] = allP[i].value;
}
// count++;
}
// searchDetails[count] = tourney.selectedIndex;
myOptions[name] = searchDetails;
serialize("SEARCHES", myOptions);
showSearchs();
}
}

// The Load Button Handler
var loadButtonHandler = function loadButtonHandler(searchDetails,s,bRun)
{
loadedName = s;
var allP = document.getElementById('middleColumn').getElementsByTagName("input");
// var count = 0;
for( i in allP )
{
if(allP[i].type=="checkbox")
{
if ( typeof(searchDetails[allP[i].id]) != "undefined" )
{
allP[i].checked = searchDetails[allP[i].id] ;
}
else
{
// We dont have this checkbox in the saved search
// So treat it as "False" and add it to the saved search
allP[i].checked = false;
searchDetails[allP[i].id] = false;
myOptions[s] = searchDetails;
serialize("SEARCHES", myOptions);
}
}
if(allP[i].type=="text")
{
if( typeof(searchDetails[allP[i].id]) != "undefined" )
{
allP[i].value = searchDetails[allP[i].id];
}
else
{
// We dont have this textbox in the saved search
// So treat it as "" and add it to the saved search
allP[i].value = "";
searchDetails[allP[i].id] = "";
myOptions[s] = searchDetails;
serialize("SEARCHES", myOptions);
}
}
// count++;
}
// var tourneyId = document.getElementById('middleColumn').getElementsByTagName("select");
// tourneyId.selectedIndex = searchDetails[count];
if (bRun)
{
searchButton.click();
}
}
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Re: New Greasemonky Script - Saved Searchs

Postby Han Solo on Wed Nov 07, 2007 2:08 am

Saved Searches Script by stocksr
Adds a "Bookmark this search" button to the Game Finder
http://www.conquerclub.com/forum/viewtopic.php?t=18815

other people have the same problem : after loading the last Firefox update 2 days ago, this script has stopped working.

any solution ? this is a very helpful tool.

Thx,
Han Solo

ps : Posted in the Bugs Forums 2 days ago, but got no reaction.
User avatar
Major Han Solo
 
Posts: 34
Joined: Thu Aug 30, 2007 3:50 am

Re: New Greasemonky Script - Saved Searchs

Postby Selin on Wed Nov 07, 2007 3:25 am

Han Solo wrote:Saved Searches Script by stocksr
Adds a "Bookmark this search" button to the Game Finder
http://www.conquerclub.com/forum/viewtopic.php?t=18815

other people have the same problem : after loading the last Firefox update 2 days ago, this script has stopped working.

any solution ? this is a very helpful tool.

Thx,
Han Solo

ps : Posted in the Bugs Forums 2 days ago, but got no reaction.


I have the same problem :(

In fact, it was very useful.

.
Brigadier Selin
 
Posts: 1100
Joined: Wed Oct 04, 2006 7:56 am
Location: Istanbul, Turkey

Postby Aerial Attack on Wed Nov 07, 2007 10:06 am

Hey all,

I don't know what I did, but I spent some time on the situation and it works for me - I make no guarantees about anything (NOTE: I added the functionality to save Tournament Name too - no more scrolling through tourney drop down). The update to player.php instead of playerspace.php to match lack's changes fixes the old Saved Searches, if you don't trust this code.

EDIT: I have created an account on userscripts.org

Here is the Saved Searches link
Last edited by Aerial Attack on Thu Nov 08, 2007 10:42 am, edited 8 times in total.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Frop on Wed Nov 07, 2007 10:14 am

Actually you can just use the current script. Right click on the monkey icon -> Manage User Scripts and select 'Conquer Club - Saved Searches'. Change the Included Pages to 'http://www.conquerclub.com/player.php?mode=find*'.
User avatar
Captain Frop
 
Posts: 1201
Joined: Thu May 10, 2007 3:02 pm

Postby Aerial Attack on Wed Nov 07, 2007 10:18 am

Okay - I'm not sure how/if I updated mine to have the correct included page. But mine does allow you to use the tournament drop down now in your saved searches (wasn't previously an option).

EDIT: Okay - should be working now. I've updated the above post with the appropriate included page section.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Han Solo on Wed Nov 07, 2007 11:42 am

thanks a lot guys :-):-):-)
User avatar
Major Han Solo
 
Posts: 34
Joined: Thu Aug 30, 2007 3:50 am

Saved Searches

Postby thespider on Mon Nov 12, 2007 9:56 am

Is this working with the 2.0.0.9 Firefox?
User avatar
Sergeant thespider
 
Posts: 8
Joined: Tue May 01, 2007 7:54 pm

Re: Saved Searches

Postby Aerial Attack on Tue Nov 13, 2007 11:47 am

thespider wrote:Is this working with the 2.0.0.9 Firefox?

I assume so. That's the version of Firefox I'm running.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby MarVal on Tue Nov 13, 2007 5:07 pm

It doesn't work for me. Every time I login on CC and I go to the Game Finder page and click on my saved search, I load evrytime another torunament and not the one I've saved?

Can you tell me what I'm doing wrong?

I put in: http://www.conquerclub.com/player.php?mode=find*
I work with Firefox 2.0.0.9
And greasemonkey is on.

I hope you can help me with this.

Grtz
MarVal
Image highest score: 2157 (Major) / Verd ori'shya beskar'gam
ImageImage
User avatar
Corporal MarVal
 
Posts: 3823
Joined: Sat Nov 11, 2006 4:45 pm
Location: De Veroveraars der Lage Landen

Postby Aerial Attack on Tue Nov 13, 2007 7:20 pm

I think I know what's going on.

I'm using Selected Index which should not be affected by alphabetical ordering, but it might be. Therefore, every time they add a new tournament above yours it won't work. I'll have to verify my assumption (and change the code).

EDIT: I have changed the code and uploaded it to the userscripts.org page. All I need now is to have a tournament added or removed and I can finish testing.

- Aerial Attack
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Aerial Attack on Wed Nov 14, 2007 4:00 pm

New Version 2.12 is available. This handles the situation where a tournament (alphabetically before yours) is added or removed. Also alerts you if a tournament has been removed.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby MarVal on Wed Nov 14, 2007 5:56 pm

I'll download and install the new version. But it doesn't seem to work.
Instead of the old one were I can click on the "Bookmark" button, I see on the new version no button at all. Only the search one.

Grtz
MarVal
Image highest score: 2157 (Major) / Verd ori'shya beskar'gam
ImageImage
User avatar
Corporal MarVal
 
Posts: 3823
Joined: Sat Nov 11, 2006 4:45 pm
Location: De Veroveraars der Lage Landen

Postby Aerial Attack on Wed Nov 14, 2007 6:22 pm

Stupid Typos - fixed.
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby MarVal on Thu Nov 15, 2007 4:21 pm

Yes, it works.

And thanks for your quick replies and fix =D>

Grtz
MarVal
Image highest score: 2157 (Major) / Verd ori'shya beskar'gam
ImageImage
User avatar
Corporal MarVal
 
Posts: 3823
Joined: Sat Nov 11, 2006 4:45 pm
Location: De Veroveraars der Lage Landen

Postby Aerial Attack on Mon Nov 19, 2007 1:50 pm

New Version uploaded.

This allows you to save Game Creation settings as well as Game Finding settings. Enjoy.

It also checks to see if you have supplied a password for tournament games (as they require one).

EDIT: Due to feedback, I have crippled the Game Creation settings saver. It only works for Tournament Game Settings for Tournament Organizers. I will let you know if/when I am allowed to re-enable this feature for general use.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Aerial Attack on Tue Nov 20, 2007 11:03 am

I have added a new script that allows you to confirm if you want to drop a game. See signature link
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby gimil on Tue Nov 20, 2007 11:10 am

works perfectly :)
What do you know about map making, bitch?

natty_dread wrote:I was wrong


Top Score:2403
User avatar
Corporal 1st Class gimil
 
Posts: 8599
Joined: Sat Mar 03, 2007 12:42 pm
Location: United Kingdom (Scotland)

Postby remydog on Mon Nov 26, 2007 6:09 pm

Aerial Attack wrote:New Version uploaded.

This allows you to save Game Creation settings as well as Game Finding settings. Enjoy.

It also checks to see if you have supplied a password for tournament games (as they require one).

EDIT: Due to feedback, I have crippled the Game Creation settings saver. It only works for Tournament Game Settings for Tournament Organizers. I will let you know if/when I am allowed to re-enable this feature for general use.


Dang! I just came looking for this very thing. Curious why they oppose it?
User avatar
Sergeant 1st Class remydog
 
Posts: 148
Joined: Wed Oct 17, 2007 7:31 pm

Postby MarVal on Tue Nov 27, 2007 3:18 am

Yeah, its working fine! Thanks again.

Grtz
MarVal
Image highest score: 2157 (Major) / Verd ori'shya beskar'gam
ImageImage
User avatar
Corporal MarVal
 
Posts: 3823
Joined: Sat Nov 11, 2006 4:45 pm
Location: De Veroveraars der Lage Landen

Postby Aerial Attack on Thu Nov 29, 2007 2:55 am

I actually have a new version in the coding/testing phase. All it really does is combine the Confirm Drop Down script - but this includes it for Game Finder (Private and Tournament Games you create) as well as Awaiting Games. The only issue is that certain special characters (in a tourney name) cause the hyper-link to go bad when you drop a game. Once I get that resolved I'll post the update.

I just realized why a Tourney Organizer would want to save Game Presets (and why I included it). In some tournaments people have different home settings - you save each person's home settings as a link (page down instead of finding and clicking each check box AND remembering the settings).
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby PsyDev on Thu Nov 29, 2007 10:23 pm

The script actually wasn't working for me.

I tried to find out what was wrong by going to greasemonkey options in Firefox. I looked at the page that it applied to and it said:
http://www.conquerclub.com/playerspace.php?page=find*

It should have been:
http://www.conquerclub.com/player.php?mode=find

Works now.
User avatar
Major PsyDev
 
Posts: 32
Joined: Thu May 10, 2007 12:28 pm
Location: Vancouver, B.C.

PreviousNext

Return to Tool Archives

Who is online

Users browsing this forum: No registered users

cron