Grease Pencil Onion skin toggle from Dope Sheet

This bugged me for some time,and I saw a bug report on
Since the 2.8 UI is “frozen”, the developers suggested a python script workaround…So…here it is:

there is one issue though…instead of creating one button,it creates 3. If any of you experienced python developers know why this is so…do comment.

Otherwise the script it really simple.It will toggle the onion skin for a selected layer in the Dope Sheet. No need to go to object mode and select another object. Just select the layer and press the button.
And yes…it works with multiple selected layers.

Have fun.