Просмотр исходного кода

Initialize converse inside main.js

JC Brand 12 лет назад
Родитель
Сommit
7066e70b68
3 измененных файлов с 7 добавлено и 12 удалено
  1. 0 10
      index.html
  2. 7 1
      main.js
  3. 0 1
      tests.html

+ 0 - 10
index.html

@@ -131,16 +131,6 @@
     </div>
 </div>
 
-<script type="text/javascript">
-    $(document).ready(function {
-        converse.initialize({
-            prebind: false,
-            xhr_user_search: false,
-            auto_subscribe: false 
-        });
-    });
-</script>
-
 <script type="text/javascript">
     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
     document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

+ 7 - 1
main.js

@@ -1 +1,7 @@
-require(["jquery", "converse"], function($) {});
+require(["jquery", "converse"], function($, converse) {
+    converse.initialize({
+        prebind: false,
+        xhr_user_search: false,
+        auto_subscribe: false 
+    });
+});

+ 0 - 1
tests.html

@@ -21,7 +21,6 @@
         </header>
     </div>
 
-
     <div id="chatpanel">
         <div id="collective-xmpp-chat-data"></div>
         <div id="toggle-controlbox">