NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name take xan
// @namespace torn.com
// @author Ahab [1735214]
// @include *www.torn.com/*
// @version 1.0
// @license MIT
// ==/UserScript==
function flash(){
var observerTarget = document.querySelector('ul[class^=status-icons]');
var observerConfig = { attributes: true, childList: true, characterData: true, subtree: true };
var observer = new MutationObserver(function(mutations) {
if($('a[href="/item.php?temp=1"]').length === 0 ){
setInterval(function() {
$("#body").fadeOut(5000).fadeIn(300);
if($('a[href="/item.php?temp=1"]').length === 1 ){
$("#body").stop(true, true).fadeOut(0).fadeIn(0);
}
}, 1000);
}
});
observer.observe(observerTarget, observerConfig);
};
flash();