Confirmation Greasemonkey script v0.2
Moderator: Tech Team
Forum rules
Please read the Community Guidelines before posting.
Please read the Community Guidelines before posting.
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
Confirmation Greasemonkey script v0.2
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
Get the new version here:
http://www.probablynot.com/greasemonkey ... ds.user.js
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
Just edit the script...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!
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?');" );
}
}
})();missing crucial part
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
anyways, if this is possible, it would appreciate it
alek
- tahitiwahini
- Posts: 964
- Joined: Fri Jan 19, 2007 5:26 pm
Re: missing crucial part
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.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
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?');" );
}
}
})();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
Tahitiwahini
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
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!
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!
- tahitiwahini
- Posts: 964
- Joined: Fri Jan 19, 2007 5:26 pm
If you really want to do this, instructions for how to do so are in a previous post in this thread (about 4 back).johnzam wrote:Is it possible to add a script/line for confirming troop deployment!!
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
Tahitiwahini
- Shooter_Jay
- Posts: 64
- Joined: Sat Nov 17, 2007 5:53 pm
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
No.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?
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.
Re:
moved to archives by Calidrmr 8/16/11Ishiro wrote: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.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?
reason: per OP, script not available, incorporated into BOB
no shadow topic left in place

<Juan_Bottom>You're like the Barry Bonds of drinking. You don't need the practice you just do it because you like it.

