Last active
May 5, 2017 09:12
-
-
Save Fuzzyma/36110c6deab25b1d849b0b2f2cd26d4f to your computer and use it in GitHub Desktop.
Zeigt eine Dorfliste im Dorfinterface an
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Dorfliste | |
// @namespace tribalswars | |
// @description Zeigt eine Dorfliste im Dorfinterface an | |
// @include https://*.die-staemme.de/game.php*screen=overview* | |
// @version 1.2.1 | |
// @grant none | |
// ==/UserScript== | |
$.get('game.php?screen=overview_villages&mode=prod', function(data){ | |
$widget = $('#show_effects').clone(true).attr('id', 'villages_widget') | |
$widget.find('.head').html('Dorfliste') | |
var $table = $(data).find('#production_table') | |
$table.find('th:not(:contains("Dorf"), :contains("Punkte"), :contains("Rohstoffe"), :contains("Speicher"), :contains("Bauernhof"), :contains("Händler"))').each(function(){ | |
$(this).closest('table').find('tr td:nth-child('+ $(this).index() +'), tr th:nth-child('+ $(this).index() +')').remove() | |
}) | |
$widget.find('.widget_content').html($table) | |
$('#show_outgoing_units').before($widget) | |
$('.quickedit-vn').QuickEdit( { url: TribalWars.buildURL('POST', 'main', { ajaxaction: 'change_name', village: '__ID__' } ) } ); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment