Using SVM , Logistic Regression pipelines and in tensorflow.
(https://www.tensorflow.org/lite/models/modify/model_maker/text_classification), trained on a custom dataset of almost 2 thousands classified comments from Youtube and 3other sources. I trained the original Python model using Google Colab, then converted it in the TensorFlowJS format to be used in the browser. The entire model is just 199KB, which makes it very lightweight.