Last active
April 19, 2018 13:44
-
-
Save gitnik/063dc9cdf91bc18cd6180b39092af2ee to your computer and use it in GitHub Desktop.
Revisions
-
gitnik revised this gist
Apr 19, 2018 . 1 changed file with 16 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,16 +7,24 @@ (function() { 'use strict'; window.onpopstate document.onreadystatechange = function () { if (document.readyState === "complete") { doShit(); } }; window.onpopstate = doShit(); })(); function doShit() { const conversationContainer = document.querySelector('.conversation__text'); conversationContainer.querySelectorAll('p:not(:empty)').forEach((node) => { if (node.innerText.startsWith('data:image/gif;base64')) { node.remove(); } }); } -
gitnik created this gist
Apr 19, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ // ==UserScript== // @name Intercom Base64 Remover // @author Nik Karbaum // @namespace https://app.intercom.io // @include https://app.intercom.io/a/apps/*/inbox/inbox/conversation/* // ==/UserScript== (function() { 'use strict'; document.onreadystatechange = function () { if (document.readyState === "complete") { const conversationContainer = document.querySelector('.conversation__text'); conversationContainer.querySelectorAll('p:not(:empty)').forEach((node) => { if (node.innerText.startsWith('data:image/gif;base64')) { node.remove(); } }); } }; })();