Small fleet utility to increase effective
目前為
// ==UserScript==
// @name Coordinator
// @namespace bitbucket.org/Odahviing
// @description Small fleet utility to increase effective
// @include http://www.war-facts.com/fleet.php?fleet=*
// @include http://www.war-facts.com/fleet/*
// @version 1.0
// @grant none
// ==/UserScript==
/* Has a collision with next explorer script */
// Version 1.0 - Basic version - will make it much bigger
window.setTimeout(main,100); // For loading issues
function corrdCopy()
{
// Get cords and copy
var lines = document.getElementsByClassName('light tbborder padding5');
var ahref = lines[5].getElementsByTagName('a');
document.getElementById('xyz').value=ahref[0].innerHTML.substring(0, ahref[0].innerHTML.indexOf('g')-1);
}
function main()
{
// Make New Button
var newButton = document.createElement('input');
newButton.setAttribute("class", "submit darkbutton");
newButton.setAttribute("type", "button");
newButton.setAttribute("id", "buttoncopy");
newButton.setAttribute("value", "Current");
newButton.addEventListener("click", corrdCopy, false);
// Attach Button
var corrdLine = document.getElementById('mCoordinates');
corrdLine.appendChild(newButton);
}