Conquer Club

Confirmation Greasemonkey script v0.2

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.

Confirmation Greasemonkey script v0.2

Postby Ishiro on Sat Sep 30, 2006 6:18 am

I have updated my Confirmation popup script to include the Auto-Attack button in addition to the original End Attacks and End Fortification buttons.

Get the new version here:
http://www.probablynot.com/greasemonkey ... ds.user.js
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby Qwaz on Wed Jan 17, 2007 7:23 am

brilliant, i use firefox anyways so :D
Lieutenant Qwaz
 
Posts: 9
Joined: Wed Dec 27, 2006 12:07 pm

Postby billval3 on Tue Feb 06, 2007 9:10 am

Ishiro,

Thanks for this. Is there a way I can take off the confirm for auto attack? I like the other options, just not that one.

Maybe you could republish the older one as well? Thanks!
Lieutenant billval3
 
Posts: 85
Joined: Fri Dec 22, 2006 4:23 pm
Location: NY Metro

Postby Ishiro on Tue Mar 06, 2007 8:33 am

billval3 wrote:Ishiro,

Thanks for this. Is there a way I can take off the confirm for auto attack? I like the other options, just not that one.

Maybe you could republish the older one as well? Thanks!

Just edit the script...

The whole of the script is:
Code: Select all
(function() {

    var inputs = document.getElementsByTagName("input");
    for(var a = 0; a < inputs.length; a++) {
      if (inputs[a].value == "End Attacks")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
      if (inputs[a].value == "End Fortification")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
      if (inputs[a].value == "Auto-Attack")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
    }

})();

The "inputs[a].value" is the Text on the button, just add or remove any button you wish.
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

missing crucial part

Postby alkemann on Thu Mar 22, 2007 10:46 am

I downloaded this script based on a reply to a support ticket i posted about the need for an undo button on army placement, as I experienced some unfortunate mishaps that i believe was part me and part system fault. Anyways the reply said I should install this script, but it doesnt do what I need it most to. To show a confirmation dialog when I place armies, telling me what country I am placing on and how many. If it could show on the actual map as well, that would rock.

anyways, if this is possible, it would appreciate it

alek
Corporal 1st Class alkemann
 
Posts: 1
Joined: Fri Mar 02, 2007 11:03 am

Re: missing crucial part

Postby tahitiwahini on Thu Mar 22, 2007 11:22 am

alkemann wrote:I downloaded this script based on a reply to a support ticket i posted about the need for an undo button on army placement, as I experienced some unfortunate mishaps that i believe was part me and part system fault. Anyways the reply said I should install this script, but it doesnt do what I need it most to. To show a confirmation dialog when I place armies, telling me what country I am placing on and how many. If it could show on the actual map as well, that would rock.

anyways, if this is possible, it would appreciate it

alek


I believe the following code will do for the Deploy button what the confirmation script already does for End Fortification, End Attacks, and Auto-Attack. That it, it will make you confirm the action whenever you press any of these buttons.

This would not be an "undo" button however, just a confirmation dialog (OK or Cancel) when you press the Deploy button. It would effectively tell you how many armies you were placing on a particular country (that's basically what it does now, isn't it?), but it would not show it on the actual map. It would appear on the map when you clicked OK in the confirmation dialog. If you really want an "undo" button, this fix isn't it. But if you want something that will allow you to reject a bad button press when deploying this will do the trick. I've tried it and it works.

Code: Select all
(function() {

    var inputs = document.getElementsByTagName("input");
    for(var a = 0; a < inputs.length; a++) {
      if (inputs[a].value == "End Attacks")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
      if (inputs[a].value == "End Fortification")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
      if (inputs[a].value == "Auto-Attack")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
      if (inputs[a].value == "Deploy")
      {
         inputs[a].setAttribute("onclick", "javascript:return confirm('Are you sure?');" );
      }
    }

})();


How to edit the confirmation script:

Right-click the red greasemonkey icon, and then right-click CC Phase End Confirm script.

Either this will open an editor or it will prompt you to pick an editor to use.

If it opens an editor, fine use that editor.

If it wants you to pick an editor to use, Notepad that comes with Windows works fine.

In the editor replace the entire contents with the code except from above.

When you're done save the file in the editor.

That's all there is to it.

Good luck.
Cheers,
Tahitiwahini
User avatar
Private 1st Class tahitiwahini
 
Posts: 964
Joined: Fri Jan 19, 2007 5:26 pm

Postby Ishiro on Sun Apr 01, 2007 10:16 am

A nice little warning for today (being April Fool's Day), the confirmation script will cease to function as it depends on the text of the buttons, which has been changed today.

Or, as I should say....

A neece-a leettle-a verneeng fur tudey (beeeng Epreel Fuul's Dey), zee cunffurmeshun screept veell ceese-a tu fooncshun es it depends oon zee text ooff zee boottuns, vheech hes beee chunged tudey. Bork bork bork!
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby johnzam on Fri Apr 27, 2007 4:05 pm

Is it possible to add a script/line for confirming troop deployment!!
Corporal 1st Class johnzam
 
Posts: 3
Joined: Wed Apr 25, 2007 4:21 pm

Postby tahitiwahini on Fri Apr 27, 2007 5:14 pm

johnzam wrote:Is it possible to add a script/line for confirming troop deployment!!


If you really want to do this, instructions for how to do so are in a previous post in this thread (about 4 back).

However, there's a better way:

<puts stocksr's greasemonkey script salesman hat on>

Go to the first topic in this forum (Utilities and Plug-ins for Conquer Club) and look for stocksr's greasemonkey script. Start using Mozilla Firefox as your browser if you aren't already. Download and install greasemonkey. Download and install stocksr's greasemonkey script. Once installed you will notice a Greasemonkey Menu on left of the screen (along with the existing Game, Interaction, and Personal Menus). You will only see this when you have a game window open. Make sure Confirm Options: On, if it's not just click it and it will be. One of the things that will be confirmed once you do this is the Deploy button.

In my opinion, upon the integration of the confirmation script into stocksr's greasemonky script there's really no reason to use the confirmation script when you can get the same functionality (but with greater configurability) with stocksr's script.

<takes stocksr's greasemonkey script salesman hat off>

Hope this helps.
Cheers,
Tahitiwahini
User avatar
Private 1st Class tahitiwahini
 
Posts: 964
Joined: Fri Jan 19, 2007 5:26 pm

Postby redtide on Fri Oct 19, 2007 8:41 am

I'm trying to load the confirmation script at the top, but am getting an error message saying something like "error loading. 404. Ok"

Any idea what's up?
Corporal 1st Class redtide
 
Posts: 176
Joined: Mon Jan 08, 2007 2:49 pm

Postby yeti_c on Fri Oct 19, 2007 8:59 am

redtide wrote:I'm trying to load the confirmation script at the top, but am getting an error message saying something like "error loading. 404. Ok"

Any idea what's up?


I suspect that it doesn't work with AJAX turned on...

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby redtide on Wed Oct 24, 2007 11:19 am

But I can't even download and install it - it seems like that's a bad link, although I've used it in the past. Any ideas?
Corporal 1st Class redtide
 
Posts: 176
Joined: Mon Jan 08, 2007 2:49 pm

Postby Ishiro on Wed Oct 24, 2007 11:51 am

redtide wrote:But I can't even download and install it - it seems like that's a bad link, although I've used it in the past. Any ideas?


This script does not exist anymore. I stopped updating it when it got incorporated into BOB. After a few months I removed the file from my website.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby redtide on Thu Oct 25, 2007 11:55 am

Bummer! I love BOB, but for some reason it screws my keyboard all up. After every few turns I have to unplug my keyboard from my KVM switch to get it to work. When I disabled BOB, the problem stopped.
Corporal 1st Class redtide
 
Posts: 176
Joined: Mon Jan 08, 2007 2:49 pm

Postby Tyrion81 on Thu Oct 25, 2007 6:19 pm

That's extremely odd, I can't see how that would happen.

What operating system, version of firefox and greasemonkey are you running?
Corporal 1st Class Tyrion81
 
Posts: 14
Joined: Thu Mar 22, 2007 8:29 pm
Location: Sydney, Australia

Postby Shooter_Jay on Sat Dec 01, 2007 2:22 am

So if I read this thread right, if I download and install firefox then greasemonky and adjust/set it up right, I will be able to cancel a fortify AFTER seeing the numbers change on the map?
This is my sig...
User avatar
Sergeant Shooter_Jay
 
Posts: 64
Joined: Sat Nov 17, 2007 5:53 pm

Postby Ishiro on Sat Dec 01, 2007 9:15 am

Shooter_Jay wrote:So if I read this thread right, if I download and install firefox then greasemonky and adjust/set it up right, I will be able to cancel a fortify AFTER seeing the numbers change on the map?


No.

First, this particular script does not work any more with this website.

Second, once the numbers change on the map, you can't go back. All confirmation scripts do is give you a pop-up window that asks "Are you sure?" with OK and CANCEL buttons. If you cancel, it stops the process, if you hit OK, it places the armies on the board.

The functionality of this script is built into AJAX BOB now.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby Shooter_Jay on Sat Dec 01, 2007 10:44 am

ok thanks
This is my sig...
User avatar
Sergeant Shooter_Jay
 
Posts: 64
Joined: Sat Nov 17, 2007 5:53 pm

Re:

Postby Calidrmr on Tue Aug 16, 2011 12:59 pm

Ishiro wrote:
redtide wrote:But I can't even download and install it - it seems like that's a bad link, although I've used it in the past. Any ideas?


This script does not exist anymore. I stopped updating it when it got incorporated into BOB. After a few months I removed the file from my website.

moved to archives by Calidrmr 8/16/11
reason: per OP, script not available, incorporated into BOB
no shadow topic left in place
Image
<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.
User avatar
Corporal Calidrmr
 
Posts: 641
Joined: Wed Sep 12, 2007 5:00 pm
Location: the corner bar...


Return to Tool Archives

Who is online

Users browsing this forum: No registered users