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?
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.
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 ?)
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(); } }
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
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*'.
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.
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?
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.
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.
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.
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.
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?
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).