aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-05-07 12:07:09 +0200
committerGitHub <noreply@github.com>2019-05-07 12:07:09 +0200
commit5c9b4db994fac0694a83f609e153bd9e89366e5e (patch)
tree93b2e05b0625aaf1092c4fa07aa6ab57a183fa9a /core/js/js.js
parent038dff3530cd3b47238128873667e2bc824fb20c (diff)
parentae8959af74a8d7b4b6a4f282e13ab87fe35f4ff6 (diff)
downloadnextcloud-server-5c9b4db994fac0694a83f609e153bd9e89366e5e.tar.gz
nextcloud-server-5c9b4db994fac0694a83f609e153bd9e89366e5e.zip
Merge pull request #15403 from nextcloud/refactor/oc-get-set-bundle
Move OC.get and OC.set to the bundle
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 0959528b31a..76b0ecda492 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1113,41 +1113,4 @@ if (window.history.pushState) {
else {
$(window).on('hashchange', _.bind(OC.Util.History._onPopState, OC.Util.History));
}
-
-/**
- * Get a variable by name
- * @param {string} name
- * @return {*}
- */
-OC.get=function(name) {
- var namespaces = name.split(".");
- var tail = namespaces.pop();
- var context=window;
-
- for(var i = 0; i < namespaces.length; i++) {
- context = context[namespaces[i]];
- if(!context){
- return false;
- }
- }
- return context[tail];
-};
-
-/**
- * Set a variable by name
- * @param {string} name
- * @param {*} value
*/
-OC.set=function(name, value) {
- var namespaces = name.split(".");
- var tail = namespaces.pop();
- var context=window;
-
- for(var i = 0; i < namespaces.length; i++) {
- if(!context[namespaces[i]]){
- context[namespaces[i]]={};
- }
- context = context[namespaces[i]];
- }
- context[tail]=value;
-};