Restrict Attachment file type by using content/script editor

%3CLINGO-SUB%20id%3D%22lingo-sub-1415691%22%20slang%3D%22en-US%22%3ERestrict%20Attachment%20file%20type%20by%20using%20content%2Fscript%20editor%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415691%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20restrict%20the%20file%20type%20of%20the%20sharepoint%20list%20attachment%2C%20excluding%20txt%20file.%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20do%20this%20using%20a%20content%2Fscript%20editor%20as%20the%20designer%20and%20infopath%20are%20banned%20under%20my%20environment.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20in%20advance.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1415691%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hi, all, 

 

I want to restrict the file type of the sharepoint list attachment, excluding txt file. 

Is it possible to do this using a content/script editor as the designer and infopath are banned under my environment.  

thanks in advance.