// abload.de
// abload.de wird direkt eingebunden um das Hochladen von Bildern zu vereinfachen (iframe) - nur bei Aufloesungen oberhalb von 1024x768
// (c) 2010 by Dicope
// Mail: dicope [aht] plan-of-attack [puhnkt] net
// ==UserScript==
// @name          abload.de
// @namespace     http://greasemonkey.ppopn.net
// @description   abload.de wird direkt eingebunden um das Hochladen von Bildern zu vereinfachen (iframe) - nur bei Aufloesungen oberhalb von 1024x768
// @include       http://82.149.226.131/bb/newreply.php*
// @include       http://forum.counter-strike.de/bb/newreply.php*
// @include       http://forum.cstrike.de/bb/newreply.php*
// @include       http://forum.mods.de/bb/newreply.php*
// @include       http://82.149.226.131/bb/newthread.php*
// @include       http://forum.counter-strike.de/bb/newthread.php*
// @include       http://forum.cstrike.de/bb/newthread.php*
// @include       http://forum.mods.de/bb/newthread.php*
// @include       http://82.149.226.131/bb/editreply.php*
// @include       http://forum.counter-strike.de/bb/editreply.php*
// @include       http://forum.cstrike.de/bb/editreply.php*
// @include       http://forum.mods.de/bb/editreply.php*
// ==/UserScript==

var gmabload = function() {
  var grey = document.createElement("div");
  grey.style.position = "fixed";
  grey.style.height = "100%";
  grey.style.width = "100%";
  grey.style.top = "0px";
  grey.style.left = "0px";
  grey.style.MozOpacity = "0.7";
  grey.style.backgroundColor = "#000000";
  grey.id = "gmabgrey";
  document.body.appendChild(grey);
  var ab = document.createElement("iframe");
  ab.style.position = "fixed";
  ab.style.top = (document.body.clientHeight - 600) / 2 + "px";
  ab.style.left = (document.body.clientWidth - 800) / 2 + "px";
  ab.style.width = "800px";
  ab.style.height = "600px";
  ab.style.margin = "auto";
  ab.style.border = "outset 2px #FFFFFF";
  ab.src = "http://www.abload.de/";
  ab.id = "gmabif";
  document.body.appendChild(ab);
  var close = document.createElement("div");
  close.style.position = "fixed";
  close.style.top = (document.body.clientHeight - 636) / 2 + "px";
  close.style.right = (document.body.clientWidth - 700) / 2 + "px";
  close.width = "10px";
  close.height = "10px";
  close.style.backgroundColor = "#394E63";
  close.style.MozBorderRadiusTopleft = "10px";
  close.style.MozBorderRadiusTopright = "10px";
  close.style.padding = "0px 5px 5px 5px";
  close.style.fontSize = "0.8em";
  close.id = "gmabclose";
  close.innerHTML = "<a href=\"javascript:document.body.removeChild(document.getElementById('gmabgrey'));document.body.removeChild(document.getElementById('gmabclose'));document.body.removeChild(document.getElementById('gmabif'));void(0);\">schlie&szlig;en</a>";
  document.body.appendChild(close);
}

var imgs = document.getElementsByTagName("img");
var i = 0;
while(i < imgs.length) {
  if(imgs[i].src.match(/.*\/img\/buttons\/img\.gif/)) {
    var img = document.createElement("img");
    img.src = "data:image/gif,GIF89a%17%00%17%00%F7%00%00%8A%88%89%88%86%87%86%84%85%CC%96%BA%BDv%AF%BEy%B0%A2%3F%9B%96%25%91%99%2C%94%8C%11%8A%92%1E%8F%84%00%84%86%05%86%87%07%87%C7%C4%C7%86%84%86%85%83%85%84%82%84DCDCBCBAB%CA%B4%CD%9A%7F%A1mo%BA%24.%3B!%2C9%22-%3A9Mc%23.%3A%24%2F%3B)3%3E'2%3D(3%3E.8B%2B6%40%2C7A3%3DE4%3EF9CI%3FHM%3BEJ%09s%94%09q%93%044C%0D%9F%CE%08%60%7C%07Sk%04.%3B%3A%A8%CBN%C9%F0%60%CF%F2b%CF%F2e%D0%F2g%D1%F2h%D1%F2%80%D8%F5%8B%DC%F5%92%DE%F6Cbl%A0%E2%F7%A6%E4%F8%AE%E6%F8%C3%EA%F7%C7%EE%FADMPENQ%D8%F3%FC%E4%F7%FD%14CQ%3D%AF%D0%A5%E4%F7%40%AD%CA%1E%3FG%A0%C2%CAIRT%26GM7W%5CMqv9%B1%BE%D1%E1%E2%22BCLUUNWWe%89%87K%5D%5C%9B%BE%BCS%5C%5BQZYPYX%5Bc%60%C0%CC%C5fmgEPF%86%9B%80ovmUaO%A2%B2%99z%80t%86%84%03%FF%FF%0A%FF%FF%16%FF%FF%3C%FF%FFF%07%07%05%16%16%10%0F%0F%0B%1B%1B%14%88%88eyyZ%3F%3F%2F%87%87eSS%3EOO%3BCC244'%1D%1D%16%0D%0D%0A%05%05%04ZZT%96%94%1C%B8%B7%AB%B7%B6%AA%B5%B4%A9%AF%AE%A4%B1%B0%A6%A7%A6%9EYXSWVQTSO%9A%99%95%99%98%94%97%96%92QPM%94%93%90%9F%9D%98LKI%9D%9B%97NMK%98%96%93%96%94%91%92%90%8EIHGHGF%94%92%90%93%91%8FKJI%90%8E%8D%8E%8C%8B%8D%8B%8A%B3%80r%A2QF%96%25%1C%99%2C!%91%1B%14%8B%0F%0B%8E%14%0F%84%00%00%84%01%01%86%04%03%87%07%05%89%0A%07%8E%8C%8C%8C%8A%8A%8B%89%89%8A%88%88IHHGFFFEEEDD%FF%FF%FF%01%01%01%00%00%00%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%AC%00%2C%00%00%00%00%17%00%17%00%00%08%FF%00S%09%1CH%B0%A0%C1T%14RmX%C8%B0%A1C%87%11%12n%C8%40%B1%A2%C5%8B%16%23*%C4%C8%11%A3%C6%89%19VE%10Ir%A4I%92%14%3F%A6%3Ch0%82%86%0C*C%12%8C%C0%A9%93%A7O%01%06%D6%C1%A0!f%04%82%9C8y%02%A5i%D3%40R%1F8%C4%5CEpA%84%06%092%5D%12%24%10%8D%88%0E%3E%09%AAr%40%87%0C%26KI~%A4ZT%02D%84%09%1Be%0A%14%D3%60%8C%82T%7D*%19%C9%91%AAM%10%12%01N%A5%FD%99J%40%AA%04sR%95%C9%A3%85%07%8ET%7C%B2%00%09u(-S%81i%D4%20%E8%93jM%85%1D7R%B1%F1b%A5%10%A1%BD%04%EFp%19%F2%04%8C%90%1C3%7CT%99%D2%24%D0%1F%C7%04%05%F5%90A%A3%86%8D%18%2CT%B4p%E1%C2%90%1D%D0%03%15%5DpR%E4%08%8C%14Dt0Y%82%04%91%1F%D8%A9%02PJ%25%E7%0D%81%01%5DV%E8H%E5%26L%96A%80%40Gx%60%20%F0%80%013%05%2C%BC%60%92%0A%CF%96(%8C%129%8E%A0%0A%C2%19Rh%14%C5%D9%F3%E5%05%14%3Dp%60%81%C2(%8D%A4U%91%06%1Ct%00%02%09%40XA%C5%0BHd%11%05%0A%23%08%20%81%81%17i%E0%01%09'(q%85%14%40%98%10%02V%09E%60%E2%89(%3E%00%C0%24%8C%3C%02%89%24%A2%04%00AD%14%D4h%E3%8D%14H%60J)%87%24%92H%24%8E%A02A%8D%01%01%00%3B";
    img.addEventListener("click", gmabload, true);
    imgs[i].parentNode.insertBefore(img, imgs[i+1]);
    imgs[i].parentNode.insertBefore(document.createTextNode(" "), imgs[i+2]);
  }
  i++;
}