Skip to content

Instantly share code, notes, and snippets.

@andersonvom
Created November 19, 2015 13:13
Show Gist options
  • Save andersonvom/f99e5cc08b6f4e221471 to your computer and use it in GitHub Desktop.
Save andersonvom/f99e5cc08b6f4e221471 to your computer and use it in GitHub Desktop.

Revisions

  1. andersonvom revised this gist Nov 19, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion slack-ignore-attachments.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    // ==UserScript==
    // @name Hide Slack.com image attachments
    // @namespace https://gist.github.com/andersonvom/
    // @namespace https://gist.github.com/andersonvom/f99e5cc08b6f4e221471
    // @version 0.0.1
    // @description Ignore slack.com image attachments, but still leaves the original link
    // @author andersonvom
  2. andersonvom created this gist Nov 19, 2015.
    16 changes: 16 additions & 0 deletions slack-ignore-attachments.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    // ==UserScript==
    // @name Hide Slack.com image attachments
    // @namespace https://gist.github.com/andersonvom/
    // @version 0.0.1
    // @description Ignore slack.com image attachments, but still leaves the original link
    // @author andersonvom
    // @match https://*.slack.com/*
    // @grant none
    // ==/UserScript==

    if(document.body) {
    $("#msgs_div").on('DOMSubtreeModified propertychange', function() {
    var attachments = $(".message_body .inline_attachment .msg_inline_img_holder");
    attachments.hide();
    });
    };