aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 1e9ae4cc695..f24694124ad 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -211,6 +211,14 @@ var OC={
},
/**
+ * Protocol that is used to access this ownCloud instance
+ * @return {string} Used protocol
+ */
+ getProtocol: function() {
+ return window.location.protocol.split(':')[0];
+ },
+
+ /**
* get the absolute path to an image file
* if no extension is given for the image, it will automatically decide
* between .png and .svg based on what the browser supports