diff --git a/couchpotato/core/_base/_core.py b/couchpotato/core/_base/_core.py index 78d54714..320131b8 100644 --- a/couchpotato/core/_base/_core.py +++ b/couchpotato/core/_base/_core.py @@ -290,7 +290,7 @@ config = [{ }, { 'name': 'permission_file', - 'default': '0755', + 'default': '0644', 'label': 'File CHMOD', 'description': 'See Folder CHMOD description, but for files', }, diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index 19b9f455..2da96a7c 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -54,16 +54,22 @@ }, pushState: function(e){ - if((!e.meta && Browser.platform.mac) || (!e.control && !Browser.platform.mac)){ + var self = this; + + if((!e.meta && self.isMac()) || (!e.control && !self.isMac())){ (e).preventDefault(); var url = e.target.get('href'); - if(History.getPath() != url) + + // Middle click + if(e.event && e.event.button == 1) + window.open(url); + else if(History.getPath() != url) History.push(url); } }, isMac: function(){ - return Browser.platform.mac + return Browser.platform == 'mac' }, createLayout: function(){ @@ -325,11 +331,12 @@ }, openDerefered: function(e, el){ + var self = this; (e).stop(); var url = 'http://www.dereferer.org/?' + el.get('href'); - if(el.get('target') == '_blank' || (e.meta && Browser.platform.mac) || (e.control && !Browser.platform.mac)) + if(el.get('target') == '_blank' || (e.meta && self.isMac()) || (e.control && !self.isMac())) window.open(url); else window.location = url;