Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Del own message
- // @version 0.1
- // @description made it not add duplicate to others messages. EDIT: PARTIALLY WORKING. PLUG CHANGED HTML. Edit: should work again
- // @author Ravana
- // @match https://plug.dj/*
- // @require http://code.jquery.com/jquery-latest.js
- // ==/UserScript==
- setTimeout(function() {
- var currentUser=API.getUser().id;
- API.on(API.CHAT,function(data){
- if(currentUser!=data.uid)return;
- $("[data-cid="+data.cid+"]").prepend('<div class="delete-button own-message">Erase</div>');
- $("[data-cid="+data.cid+"]").mouseenter(function(){$(this).children().first().css("display","block")});
- $("[data-cid="+data.cid+"]").mouseleave(function(){$(this).children().first().css("display","none")});
- $(".own-message").click(function(){API.moderateDeleteChat($(this).parent().attr("data-cid"))});
- })
- },10000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement