TheFabulousPika / steam-chatlog-to-text

A chrome extension that converts Steam webchat log to text format
2 stars 0 forks source link

Change msgText formatting detection method #35

Closed TheFabulousPika closed 4 years ago

TheFabulousPika commented 4 years ago

Consolidate detection algorithm by selecting by class and checking node length


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;
    }
}
TheFabulousPika commented 4 years ago

the following functions can be consolidated immediately: checkIfPre() checkIfCode() checkIfQuote() checkIfFlip() checkIfStoreLink()

TheFabulousPika commented 4 years ago

the following functions can be consolidated immediately: checkIfPre() checkIfCode() checkIfQuote() checkIfFlip() checkIfStoreLink()

Completed in #37

Remaining msgText types giphy spoilertext spoilermedia graph me youtube img sticker trade tweet random

TheFabulousPika commented 4 years ago

the following functions can be consolidated immediately: checkIfPre() checkIfCode() checkIfQuote() checkIfFlip() checkIfStoreLink()

Completed in #37

Remaining msgText types giphy spoilertext spoilermedia graph me youtube img sticker trade tweet random

graph, youtube, img fixed in #40

TheFabulousPika commented 4 years ago

the following functions can be consolidated immediately: checkIfPre() checkIfCode() checkIfQuote() checkIfFlip() checkIfStoreLink()

Completed in #37 Remaining msgText types giphy spoilertext spoilermedia graph me youtube img sticker trade tweet random

graph, youtube, img fixed in #40

giphy, voicechat, tradeoffer, tweet, random, video updated #47 me, spoilertext, spoilermedia, sticker do not use a simple className search and thus will be left as-is.