Add “Select All” (similar to “clear all filter”) option from the column header

I need to click “Select All” under any column (similar to “Clear all” button on Column Header menu ). It should select all values of column.

Can it be done using Script Editor? What script would it be?