A toolbar for your panel that allows you to switch workspaces. Latest update includes a panel position option of left, center, and right. Also there is an option to display the Overview on mouse entry. Right-click extension to access preferences. Development builds at: https://github.com/mbokil/workspacebar
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
There are still two more uses of eval in _setPosition. Note that you can use the bracket notation instead of if statements.
In this case I have not been able to get bracket notation to work. I tried every combination possible but it always generates errors. So I am going with if statements for now. Honestly I don't really see an issue with eval. It worked perfectly for this condition. If people are going to create problems one could just as easily do it with a file IO object. Just as dangerous IMO. I eliminated all the evals.
let box = Main.panel["_" + this.boxPosition + "Box"]; box.remove_actor(this.buttonBox); > If people are going to create problems one could just as easily do it with a file IO object. Just as dangerous IMO. And I'll reject that extension, too.
Good thing you are consistent. :) Thanks for the example. I will get it in the next version. It is unnecessary for now since 3 lines of if statements is marginal in performance though the approach is not optimal.