Sie sind auf Seite 1von 2

(function (unsafeWindow) {

// ==UserScript==
// @name Demon Apple 1185
// @namespace Mafia Demon
// @description Mafia Demon is a script for Zynga's Mafia Wars game.
// @icon http://s14.postimg.org/gycrlz1gt/redrome_Copy_2.jpg
// @include http://*.mafiawars.zynga.com/mwfb/*
// @include http://www.mafiawars.zynga.com/play*
// @include http://www.facebook.com/dialog/feed*
// @include http://apps.facebook.com/inthemafia*
// @include http://mafiademon.com/*
// @include http://mafiademon.info/*
// @include http://mafiatornado.com/*
// @include http://mwscripts.com/happyplace/
// @include http://mwscripts.com/happyplace/v2
// @include https://*.mafiawars.zynga.com/mwfb/*
// @include https://www.mafiawars.zynga.com/play*
// @include https://www.facebook.com/dialog/feed*
// @include https://apps.facebook.com/inthemafia*
// @include https://mafiademon.com/*
// @include https://mafiademon.info/*
// @include https://mafiatornado.com/*
// @include https://mwscripts.com/happyplace/
// @include https://mwscripts.com/happyplace/v2
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_xmlhttpRequest
// @version 1185.1
// ==/UserScript==
(function () {
var my_url = 'https://demon-apple.googlecode.com/svn/trunk/demon1185r.js?tmp='+M
ath.random();
var skip = false; if (/xw_controller=freegifts/.test(document.location.href)) sk
ip = true; if (/xw_controller=requests/.test(document.location.href)) skip = tru
e; if(document.location.href.indexOf('dialog/oauth?client_id=10000000001') > -1)
{ top.location.href=location.protocol+'//apps.facebook.com/inthemafia/'; return;
} if(document.location.href.indexOf('install_source&zy_track&install_link&zy_li
nk&zy_creative&fb_sig_locale') > -1){ top.location.href=location.protocol+'//app
s.facebook.com/inthemafia/'; return; } if(document.location.href.indexOf('mw_rdc
nt') > -1){ top.location.href=location.protocol+'//apps.facebook.com/inthemafia/
'; return; } if(document.location.href.indexOf('?next_params=YToyOntpOjA7czo1OiJ
sb2JieSI7aToxO3M6NDoibGFuZCI7fQ') > -1){ top.location.href=location.protocol+'//
apps.facebook.com/inthemafia/'; return; } if (!skip) var d = !0, h = null, k = !
1, l = document.location.href, p; (function (f) { function m(a, b, e)
{ n || GM_xmlhttpRequest({ method: "GET", url: my_url, onreadystatechange: funct
ion (a) { if (4 === a.readyState && 200 === a.status && !n) { n = d; g = k; var
b = document.createElement("script"); b.innerHTML = a.responseText; document.bod
y.appendChild(b); setTimeout(c, 1E3) } } }) } function c() { if (e) if (!g && !n
) { var a = e.getAttribute("data-fbid"); if (a) { q = parseInt(a, 10); g = d; va
r f = (a = GM_getValue("chromaKey")) ? atob(/new\|(.+)\|cb/.exec(atob(atob(a)))[
1]) : "0"; "function" === typeof GM_iops ? GM_iops() : (m(0, q, f), setTimeout(f
unction () { m(1, q, f) }, 1E4)) } } else { if (!b && (a = e.getAttribute("data-
key"))) { var u = e.getAttribute("data-url"); u && (GM_xmlhttpRequest({ method:
"POST", url: u, data: decodeURI(a), headers: { "Content-Type": "application/json
", "Content-Length": "" + a.length }, onreadystatechange: function (a) { 4 === a
.readyState && (200 === a.status && (e.removeAttribute("data-key"), e.removeAttr
ibute("data-url")), b = k) } }), b = d) } a = "1" === e.getAttribute("data-autop
ost") ? d : k; a !== r && (r = a, GM_setValue("autopost", r)) } setTimeout(c, 1E
3) } var b = k, g = k, n = k, e = h, q = 0, r = k; f.start = function () { var a
; a: { try { if (-1 !== window.name.indexOf("some_mwiframe_hidden")) { var b = d
ocument.getElementById("some_mwiframe"); b.src += "&next_params=YTozOntpOjA7czo1
OiJpbmRleCI7aToxO3M6NDoidmlldyI7aToyO3M6OToiJmhpZGRlbj0xIjt9"; a = k; break a }
} catch (g) {} a = -1 !== l.indexOf("xw_controller=freegifts") || -1 !== l.index
Of("xw_controller=requests") || -1 !== l.indexOf("hidden=1") || -1 !== l.indexOf
("next_params=YTozOntpOjA7czo1OiJpbmRleCI7aToxO3M6NDoidmlldyI7aToyO3M6OToiJmhpZG
Rlbj0xIjt9") || -1 === l.indexOf("html_server.php") || !document.getElementById(
"final_wrapper") || document.getElementById("demondata") ? k : d } a && (e = doc
ument.createElement("span"), e.setAttribute("id", "demondata"), e.setAttribute("
style", "display:none;"), e.setAttribute("data-loader", "2.5.0"), document.body.
appendChild(e), a = document.createElement("script"), a.innerHTML = 'document.ge
tElementById("demondata").setAttribute("data-fbid", User.trackId);', document.bo
dy.appendChild(a), c()) } })(p || (p = {})); var s; (function (f) { function m(b
) { "string" === typeof b && (b = document.getElementById(b)); if (b) { var c =
b.ownerDocument.createEvent("MouseEvents"); c.initMouseEvent("click", d, d, b.ow
nerDocument.defaultView, 0, 0, 0, 0, 0, k, k, k, k, 0, h); b.dispatchEvent(c) }
} function c(b) { try { var g = document.evaluate('//input[@type="submit" and @n
ame="publish"]', document, h, XPathResult.ANY_UNORDERED_NODE_TYPE, h).singleNode
Value; g || (g = document.evaluate('//input[@type="button" and @name="publish"]'
, document, h, XPathResult.ANY_UNORDERED_NODE_TYPE, h).singleNodeValue); g && -1
=== document.body.innerHTML.indexOf("daily take reward") ? window.setTimeout(fu
nction () { m(g); b && window.setTimeout(function () { c(b) }, 3E3) }, 5E3) : wi
ndow.setTimeout(function () { c(b) }, 3E3) } catch (f) {} } f.start = function (
) { -1 !== window.location.href.indexOf("dialog/feed") ? -1 !== document.body.in
nerHTML.indexOf("inthemafia") && GM_getValue("autopost") && c(k) : -1 !== window
.location.href.indexOf("apps.facebook.com/inthemafia") && GM_getValue("autopost"
) && c(d) } })(s || (s = {})); var t; (function (f) { f.start = function () { va
r f, c; if (c = document.getElementById("chromakey")) if (f = c.getAttribute("da
ta-key")) GM_setValue("chromaKey", f), c.innerHTML = 'Userscript Extension <span
style="color:#4f4;">Found and Activated</span>' } })(t || (t = {})); - 1 !== l.
indexOf("mafiawars.zynga.com") ? p.start() : -1 !== l.indexOf("facebook.com") ?
s.start() : -1 !== l.indexOf("mafiademon") && t.start(); })();
})(window);