Closed TheFabulousPika closed 4 years ago
function checkFormatting(a,b){
var thisMsgNode = a;
var checkClassName = "'[class*=" + b + "]'";
var testResult = thisMsgNode.querySelectorAll(eval(checkClassName)).length;
alert(testResult);
if (testResult == 0){
return false;
}
else {
return true;
}
}
else if (checkFormatting(thisMsgNode,"NonInlined")){
var dataCopyText = thisMsgNode.getElementsByClassName("NonInlined")[0].getAttributeNode("data-copytext").value;
cleanedMsgText = dataCopyText;
}
Giphy
<div class="NonInlinedEmbed" data-copystyle="merge-adjacent" data-copytext="/giphy more
https://giphy.com/gifs/more-kylo-ren-1jXGsHY2EKdL27mEMd"><a title="https://giphy.com/gifs/more-kylo-ren-1jXGsHY2EKdL27mEMd" href="https://giphy.com/gifs/more-kylo-ren-1jXGsHY2EKdL27mEMd">
<div class="NonInlinedEmbedLogo NonInlinedEmbedLogo_Giphy"></div><span style="font-weight: bold;"> /GIPHY <span class="giphySearch">more</span></span>
</a></div>
Don't embed images and other media in-line: ON