Sharing improvements

- ```$fileList``` needs to be declared before the if-statement
- always check for a unique filename, fix #8673 
- prevent default action when clicking on the share notification

cc @PVince81