2
0
Эх сурвалжийг харах

Moved call to initialize to HTML markup

- This is more user-friendly and we want it to be outside of the files bundled
  and minimized by require.js
JC Brand 12 жил өмнө
parent
commit
9e05ed8d76
2 өөрчлөгдсөн 15 нэмэгдсэн , 14 устгасан
  1. 14 0
      index.html
  2. 1 14
      main.js

+ 14 - 0
index.html

@@ -164,4 +164,18 @@
 </script>
 <script type="text/javascript">try { var pageTracker = _gat._getTracker("UA-2128260-8"); pageTracker._trackPageview(); } catch(err) {}</script>
 </body>
+<script>
+    require(["jquery", "converse"], function ($, converse) {
+        converse.initialize({
+            auto_list_rooms: false,
+            auto_subscribe: false,
+            bosh_service_url: 'https://bind.opkode.im', // Please use this connection manager only for testing purposes
+            hide_muc_server: false,
+            i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
+            prebind: false,
+            show_controlbox_by_default: true,
+            xhr_user_search: false
+        });
+    });
+</script>
 </html>

+ 1 - 14
main.js

@@ -1,14 +1 @@
-require(["jquery", "converse"], function($, converse) {
-    // Most of these initialization values are the defaults but they're
-    // included here as a reference.
-    converse.initialize({
-        auto_list_rooms: false,
-        auto_subscribe: false,
-        bosh_service_url: 'https://bind.opkode.im', // Please use this connection manager only for testing purposes
-        hide_muc_server: false,
-        i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
-        prebind: false,
-        show_controlbox_by_default: true,
-        xhr_user_search: false
-    });
-});
+require(["jquery", "converse"], function($, converse) {});