Switch to use
Remove check for protocol

Angular is unlikely to be run on file:// or about: and doesn't support i.e. 7 and 8 so it's probably worth the savings to use the short form. http://webmasters.stackexchange.com/q/1892
No need to set type
Switch to use
Use rootScope instead of the dom
Remove unused