// ==UserScript== // @name dA_ignore // @namespace dA_ignore // @author Dediggefedde // @description ignores people on dA // @match http://*.deviantart.com/* // @match https://*.deviantart.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js // @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js // @version 1.3.15 // @grant GM_setValue // @grant GM_getValue // @grant GM.setValue // @grant GM.getValue // @downloadURL none // ==/UserScript== /* Hide Tags/Description: DiFi.pushPost("DeviationView","getExtrasHTML",["501848540","",{},{"is_referred":0,"origin":"dynamic_nav_click","is_new_tab":1}],function(success, data){ console.log(data.response.content.html_col1.split("http://www.deviantart.com/tag/").length); //tag-count }); DiFi.send(); */ var ignorenames = []; var settings = { hidecomments: false, hidemessages: true, deletemessages: true, hideprofile: true, hidedeivations: true }; function pruf() { //dynamic browsing, check all 1s. setTimeout(pruf, 500); var foundindex=-1; if (settings.hidedeivations){ var thumbs=$("div.tt-a.tt-fh:not(notignore)").filter(function(){ for (var i = 0; i < ignorenames.length; i++){ if ($(this).attr("username").toLowerCase() == ignorenames[i].toLowerCase().trim()){ foundindex=i; return true; } } return false; }).attr("notignore",""); thumbs.remove(); } var bnam = $('a.u:not(notignore),div.tt-a:not(notignore),img.avatar:not(notignore)').filter(function(){ for (var i = 0; i < ignorenames.length; i++){ if(ignorenames[i]=="")continue; // console.log(ignorenames[i],$(this).html().toLowerCase()); if ($(this).html().toLowerCase() == ignorenames[i].toLowerCase().trim()||($(this).attr("username")!=null&&$(this).attr("username").toLowerCase()==ignorenames[i].toLowerCase())||($(this).attr("title")!=null&&$(this).attr("title").toLowerCase()==ignorenames[i].toLowerCase())){ if($(this).parents("div.stacklink-cover").length>0)return false; console.log(ignorenames[i],$(this).html().toLowerCase()); foundindex=i; return true; } } return false; }) .attr('notignore', ''); if(settings.hidedeivations){ bnam.parents("span.thumb").remove(); } if (bnam.length == 0) return ; // console.log(bnam); if (settings.deletemessages && bnam.parents('div.mcbox') .length > 0){ function parpas(bnam){ bnam.parents('div.ch-ctrl').find('span.mcx').get(0).click(); } setTimeout(function(){parpas(bnam);},1000); //1s delay for removing }else if (bnam.filter("img.avatar").closest("div.grf-deviants").length>0){bnam.filter("img.avatar").closest("span.f").remove();}else if (bnam.filter("img.avatar").closest('a').length>0){bnam.filter("img.avatar").closest("a").remove();}else // if (bnam.parents('.f').length>0){bnam.closest('.f').remove();console.log(".f");}else if (settings.hidemessages && bnam.parents('div.mcbox') .length > 0){bnam.parents('div.mcbox').first().remove();}else if (settings.hidecomments && bnam.parents('div.ccomment') .length > 0){bnam.parents('div.ccomment').first().remove();}else if (settings.hidecomments && bnam.parents('div.deviation-full-minipage').length > 0){ bnam.parents('div.deviation-full-minipage').prev("div.deviation-full-container").remove(); bnam.parents('div.deviation-full-minipage').remove(); }else // bnam.parents('div.ccomment').first().remove(); if (settings.hideprofile && bnam.parents('div.catbar').length > 0 && $("#da_unignore_but").length==0) { $('#gmi-GPage').html('
