Tool to let you navigate easier through DF
当前为
// ==UserScript==
// @name DF Bookmarks
// @namespace
// @version 0.3
// @description Tool to let you navigate easier through DF
// @author A Meaty Alt
// @include /fairview\.deadfrontier\.com/
// @exclude fairview.deadfrontier.com/onlinezombiemmo/index.php?page=21
// @exclude https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=21
// @require http://code.jquery.com/jquery-1.12.4.min.js
// @grant none
// @noframes
// ==/UserScript==
(function() {
var elements = {};
var outpostImg = document.createElement("img");
outpostImg.src = "https://puu.sh/xl87q/22ec393481.png";
outpostImg.height = "30";
outpostImg.width = "30";
elements.outpostLink = document.createElement("a");
elements.outpostLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php";
elements.outpostLink.appendChild(outpostImg);
elements.outpostLink.innerHTML += " Outpost";
var forumImg = document.createElement("img");
forumImg.src = "https://puu.sh/xl6wI/f7c1dc5342.png";
forumImg.height = "30";
forumImg.width = "30";
elements.forumLink = document.createElement("a");
elements.forumLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?action=forum";
elements.forumLink.appendChild(forumImg);
elements.forumLink.innerHTML += " Forum";
var marketImg = document.createElement("img");
marketImg.src = "https://puu.sh/xl6wG/9513335dc7.png";
marketImg.height = "30";
marketImg.width = "30";
elements.marketLink = document.createElement("a");
elements.marketLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=35";
elements.marketLink.appendChild(marketImg);
elements.marketLink.innerHTML += " Market";
var creditImg = document.createElement("img");
creditImg.src = "https://puu.sh/xl6wJ/505c55fd89.png";
creditImg.height = "30";
creditImg.width = "30";
elements.creditLink = document.createElement("a");
elements.creditLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=28";
elements.creditLink.appendChild(creditImg);
elements.creditLink.innerHTML += " Credit Shop";
var bankImg = document.createElement("img");
bankImg.src = "https://puu.sh/xl7HM/c2920110ca.jpg";
bankImg.height = "30";
bankImg.width = "30";
elements.bankLink = document.createElement("a");
elements.bankLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=15";
elements.bankLink.appendChild(bankImg);
elements.bankLink.innerHTML += " Bank";
var storageImg = document.createElement("img");
storageImg.src = "https://www.iconexperience.com/_img/v_collection_png/512x512/shadow/warehouse.png";
storageImg.height = "30";
storageImg.width = "30";
elements.storageLink = document.createElement("a");
elements.storageLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=50";
elements.storageLink.appendChild(storageImg);
elements.storageLink.innerHTML += " Storage";
var inventoryImg = document.createElement("img");
inventoryImg.src = "https://puu.sh/xle3E/7689941f18.png";
inventoryImg.height = "30";
inventoryImg.width = "30";
elements.inventoryLink = document.createElement("a");
elements.inventoryLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=25";
elements.inventoryLink.style.float = "right";
elements.inventoryLink.appendChild(inventoryImg);
elements.inventoryLink.innerHTML += " Inventory";
var profileImg = document.createElement("img");
profileImg.src = "https://puu.sh/xldVQ/91268b98a4.png";
profileImg.height = "30";
profileImg.width = "30";
elements.profileLink = document.createElement("a");
elements.profileLink.href = "https://fairview.deadfrontier.com/onlinezombiemmo/index.php?action=profile";
elements.profileLink.style.float = "right";
elements.profileLink.appendChild(profileImg);
elements.profileLink.innerHTML += " Profile";
var logoutImg = document.createElement("img");
logoutImg.src = "https://puu.sh/xl6wH/91e58a7b64.png";
logoutImg.height = "30";
logoutImg.width = "30";
elements.logoutLink = document.createElement("a");
elements.logoutLink.href = getLogoutLink();
elements.logoutLink.style.float = "right";
elements.logoutLink.appendChild(logoutImg);
elements.logoutLink.innerHTML += " Logout";
function getLogoutLink(){
return $("img[name=logout]").parent()[0].href;
}
var dst = document.getElementsByTagName("table")[7];
dst.innerHTML = "";
for(var element in elements){
if(element.indexOf("Link") > -1){
dst.appendChild(elements[element]);
dst.innerHTML += ' ';
}
}
})();