Nairaland Nasty Blocker

Block Nasty Image on Nairaland.com

  1. // ==UserScript==
  2. // @name Nairaland Nasty Blocker
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2.1
  5. // @description Block Nasty Image on Nairaland.com
  6. // @author GoodMuyis
  7. // @match https://*.nairaland.com/*
  8. // @grant none
  9. // @require http://code.jquery.com/jquery-latest.js
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. // Your code here.....
  15. $(document).ready(function() {
  16. $("head").append(`<style>img[src*="screenshot"],img[src*="_fb"]{display: none} .pd.sig p{ display: inline-block; margin: 2px !important; float: left;}
  17. .attachmentimage{height:30px;}.nl-hide,._9AhH0,.vertipics{display:none !important}<style>`);
  18. $(".vertipics, ._9AhH0").remove();
  19. $(".attachmentimage").each(function(){
  20. var imgl = $(this).attr("src");
  21. $(this).wrap( `<a href="${imgl}" target="_blank"></a>` );
  22. });
  23. //Block BBnaija
  24. $( '.featured.w b:contains("BBNaija")' ).closest('a').addClass('nl-hide');
  25.  
  26. //end of ready()
  27. });
  28.  
  29.  
  30. })();