Forráskód Böngészése

Add default config options to converse.js

JC Brand 12 éve
szülő
commit
7f4f3d7def
2 módosított fájl, 8 hozzáadás és 6 törlés
  1. 7 0
      converse.js
  2. 1 6
      main.js

+ 7 - 0
converse.js

@@ -2510,6 +2510,13 @@
     };
 
     converse.initialize = function (settings) {
+        // Default values
+        this.animate = true;
+        this.auto_list_rooms = false;
+        this.auto_subscribe = false;
+        this.hide_muc_server = false;
+        this.prebind = false;
+        this.xhr_user_search = false;
         _.extend(this, settings);
         this.chatboxes = new this.ChatBoxes();
         this.chatboxesview = new this.ChatBoxesView({model: this.chatboxes});

+ 1 - 6
main.js

@@ -1,10 +1,5 @@
 require(["jquery", "converse"], function($, converse) {
     converse.initialize({
-        animate: true,
-        bosh_service_url: 'https://bind.opkode.im', // Please use this connection manager only for testing purposes
-        prebind: false,
-        xhr_user_search: false,
-        auto_subscribe: false,
-        auto_list_rooms: false
+        bosh_service_url: 'https://bind.opkode.im' // Please use this connection manager only for testing purposes
     });
 });