Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Антиудалин для ЧатВдвоём
- // @description Скрипт оставляет ссылки на удалённые фотографии.
- // @author noreply@2016mail.ml
- // @include https://chatvdvoem.ru/*
- // @match https://chatvdvoem.ru/*
- // @version 0.5
- // ==/UserScript==
- var script = document.createElement("script");
- script.innerHTML = "\
- removeAllFiles = function(){\
- $('.message[type=\"image\"]').each(function(){\
- src=$(this).find(':first-child').attr('src');\
- $(this).removeAttr(\"type\").removeAttr(\"ended\");\
- $(this).css('color','#cccccc');\
- $(this).html('<a href=\"'+src+'\" target=\"_blank\">'+src+'</a>');\
- });\
- };\
- clearInterval(ImagesCheckTimer);\
- ImagesCheckTimer=setInterval(function(){\
- $('.message[type=\"image\"]').each(function(){\
- time=getCurrTime();\
- ended=parseInt($(this).attr('ended'));\
- diff=ended-time;\
- if(diff<=0){\
- src=$(this).find(':first-child').attr('src');\
- $(this).removeAttr(\"type\").removeAttr(\"ended\");\
- $(this).css('color','#cccccc');\
- $(this).html('<a href=\"'+src+'\" target=\"_blank\">'+src+'</a>');\
- }else{\
- $(this).find('.image_timer').html(diff);\
- }\
- });\
- },500);";
- document.body.appendChild(script);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement