// ==UserScript==
// @name Arcanodiode Bounty Day
// @namespace http://caigawalker.plus.com/
// @description Adds a holiday-style announcement to the main page when there is an arcanodiode bounty.
// @include *.kingdomofloathing.com/main.php
// @include *127.0.0.1:*/main.php
// ==/UserScript==
(function() {
GM_xmlhttpRequest({
method: "GET",
url: "http://" + document.location.hostname + ":" + document.location.port + "/bhh.php",
headers: { "User-agent": "Mozilla/4.0 (compatible) Greasemonkey", "Accept": "text/html", },
onload: function(resp) {
if(resp.status == "200" && resp.responseText.indexOf("These are the things I'm currently paying bounties on:") != -1 && resp.responseText.indexOf("arcanodiodes") != -1) {
var img1 = '';
var img2 = '';
var msg = 'Today is Arcanodiode Bounty Day!
You should speak to the Bounty Hunter Hunter.';
var tables = document.getElementsByTagName("table");
tables[tables.length - 3].innerHTML += '
' + img1 + ' | ' + img2 + ' | ' + img1 + ' | ' + img2 + ' |
' + msg + ' | |||
' + img2 + ' | ' + img1 + ' | ' + img2 + ' | ' + img1 + ' |