Whenever I am acticating this plugin I am breaking the media grid view. The loader icon just runs forever. The list view still works. It seems like the ajax-call behind the scenes runs several times on the media page as soon as this plugin is activated, where as it is only runned once when it is not.
The plugins itself works fine, but when I am activating it, it says 3 unexpected characters output?
I wrote this plugin based on a tutorial, maybe it can be written in a different way to not break the media grid?
LINK TO MY CUSTOM PLUGIN ON PASTEBIN