Remove last occurence of window.plugins