1 | javascript:(function() {if($('#only_someone').length == 0) {var uid = "", view_name = "";$('head').append('<style id="only_someone">.plurk.hidden{display:none;}</style>');$('#form_holder, #cbox_response, #plurk_responses').on('mouseover', '.plurk', (e) => {let target = $(e.target);while(!target.hasClass('plurk')) target = target.parent();if(target.find('.someone_button').length == 0) {if($('.plurk.hidden').length > 0) {let this_uid = target.find('.name').attr('data-uid');if((this_uid == "99999" && target.find('.name').html() == view_name) || (this_uid != "99999" && this_uid == uid))target.find('.response-manager div:eq(-1)').before('<div class="someone_button someone_cancel pif-follow_add">取消只看他</div>');}else {target.find('.response-manager div:eq(-1)').before('<div class="someone_button someone_select pif-follow_add">只看他</div>');}}});$('#form_holder, #cbox_response, #plurk_responses').on('click', '.someone_select', (e) => {let parent = $(e.target);while(parent.attr('id') != 'form_holder' && parent.attr('id') != 'cbox_response' && parent.attr('id') != 'plurk_responses') {parent = parent.parent();if(parent.hasClass('plurk')) {uid = parent.find('.name').attr('data-uid');view_name = parent.find('.name').html();}}let plurks = $('.list .plurk');if(plurks.eq(0).find('.name').attr('data-uid') == "99999") {for(let f=0; f<plurks.length; f++)if(plurks.eq(f).find('.name').html() != view_name)plurks.eq(f).addClass('hidden');}else {for(let f=0; f<plurks.length; f++)if(plurks.eq(f).find('.name').attr('data-uid') != uid)plurks.eq(f).addClass('hidden');}$(e.target).removeClass('someone_select').addClass('someone_cancel').html('取消只看他');});$('#form_holder, #cbox_response, #plurk_responses').on('click', '.someone_cancel', (e) => {$('.plurk.hidden').removeClass('hidden');$(e.target).removeClass('someone_cancel').addClass('someone_select').html('只看他');});}})() |
Direct link: https://paste.plurk.com/show/JyVq5J080ZWwSe9G3iib