Skip to content

Instantly share code, notes, and snippets.

@Fuzzyma
Last active May 3, 2017 13:41
Show Gist options
  • Save Fuzzyma/a56ff261fb196a48e70cac2c87dbd16c to your computer and use it in GitHub Desktop.
Save Fuzzyma/a56ff261fb196a48e70cac2c87dbd16c to your computer and use it in GitHub Desktop.
Bricht alle Befehle in der Dorfübersicht ab
// ==UserScript==
// @name Alle Befehle abbrechen
// @namespace tribalswars
// @description Bricht alle möglichen Befehle ab
// @include https://*.die-staemme.de/game.php*screen=overview*
// @version 1
// @grant none
// ==/UserScript==
$('#commands_outgoings').before($('<a href="#">Alle abbrechen</a>').css({
display:'block',
'text-align':'center',
padding:10,
border:'2px solid black',
background:'rgba(0,0,0,0.1)'
}).on('click', function(e){
e.preventDefault()
if(!confirm('Wirklich alle Befehle abbrechen?')) return
$('#commands_outgoings').find('.command-cancel').click()
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment