Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.49 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <base target="_blank">
  7.  
  8. <title> mXn Chat | دردشة مكسن شات </title>
  9.  
  10. <link rel="shortcut icon" href="/kiwi/assets/img/favicon.ico">
  11.  
  12. <link rel="stylesheet" type="text/css" href="/kiwi/assets/css/style.css?t=1423511744690" />
  13. <link rel="stylesheet" type="text/css" href="/kiwi/assets/css/font-awesome.min.css" />
  14. <style>
  15. #closebutton {
  16. display:none;
  17. }
  18. .modal {
  19. display:none;
  20. }
  21. </style>
  22. </head>
  23.  
  24. <script>
  25. function aud_play_pause() {
  26. var FM = document.getElementById("FM");
  27. if (FM.paused) {
  28. FM.play();
  29. } else {
  30. FM.pause();
  31. }
  32. }
  33. </script>
  34.  
  35.  
  36. <!-- PUBLICIDAD -->
  37. <div id="fade" class="overlay"></div>
  38. <div id="light" class="modal">
  39. <a title="Cerrar" class="close" id="closebutton" onClick="closeVideo();">X</a>
  40. <div id="mainContainer">
  41. <div id="content">
  42.  
  43.  
  44. <!-- FIN PUBLICIDAD -->
  45. <body onload="submitForm()">
  46.  
  47. <script type="text/html" id="tmpl_application">
  48. <div id="kiwi" class="theme_relaxed">
  49. <div class="menu">
  50. <label class="fa fa-comment"> قائمة الغرف </label>
  51. <ul>
  52. <a><li class="listclick arabroom"></li></a>
  53. <a><li class="listclick egyroom"></li></a>
  54. <a><li class="listclick romanceroom"></li></a>
  55. <a><li class="listclick shababwebanatroom"></li></a>
  56. <a><li class="listclick helproom"></li></a>
  57. </ul>
  58. </div>
  59.  
  60.  
  61. <div id="kiwi" class="theme_basic login">
  62. <div class="toolbar">
  63. <div class="app_tools">
  64. <ul class="main"
  65. <li class="settings"><i class="fa fa-comments" aria-hidden="true"></i>
  66. </div>
  67.  
  68. <div class="tabs"></div>
  69.  
  70. <div class="topic">
  71. <div contenteditable="true"></div>
  72. </div>
  73.  
  74. <div class="status_message"></div>
  75. </div>
  76.  
  77. <div class="memberlists_resize_handle"></div>
  78.  
  79. <div class="panels">
  80. <div class="panel_container container1"></div>
  81. </div>
  82.  
  83. <div class="right_bar disabled">
  84. <div class="right-bar-toggle"><i class=""></i></div>
  85. <div class="right-bar-content">
  86. <div class="channel_tools">
  87. <i class="fa fa-info-circle channel_info" title="Channel Info"></i>
  88. <i class="fa fa-sign-out channel_part" title="Leave Channel"></i>
  89. <i class="fa fa-angle-double-right right-bar-toggle-inner" title="Hide"></i>
  90. </div>
  91. <div class="memberlists"></div>
  92. </div>
  93. </div>
  94.  
  95. <div class="controlbox">
  96. <div class="input">
  97. <span class="nick"> </span>
  98. <div class="input_wrap"><textarea class="inp"></textarea></div>
  99. <div class="input_tools"></div>
  100. </div>
  101. </div>
  102. </div>
  103. </script>
  104.  
  105.  
  106. <script type="text/html" id="tmpl_channel_info">
  107. <div class="channel_info">
  108. <b class="channel_url"><a href=""></a></b>
  109.  
  110. <form>
  111. <div class="control-group channel_info_modes">
  112. <label>
  113. <input type="checkbox" name="channel_mute" class="channel-mode" data-mode="m" />
  114. Moderated chat
  115. </label>
  116. <label>
  117. <input type="checkbox" name="channel_invite" class="channel-mode" data-mode="i" />
  118. Invite only
  119. </label>
  120. <label>
  121. <input type="checkbox" name="channel_topic" class="channel-mode" data-mode="t" />
  122. Only operators can change the topic
  123. </label>
  124. <label>
  125. <input type="checkbox" name="channel_external_messages" class="channel-mode" data-mode="n" />
  126. Block messages from outside this channel
  127. </label>
  128. </div>
  129.  
  130. <div class="control-group">
  131. <label>
  132. Password
  133. <input type="text" name="channel_key" class="channel-mode" data-mode="k" />
  134. </label>
  135. </div>
  136.  
  137.  
  138. <div class="control-group channel-banlist">
  139. <button class="toggle_banlist">Toggle banlist</button> <span class="banlist-status"></span>
  140. <table>
  141. <thead>
  142. <tr>
  143. <td>Ban Mask</td>
  144. <td>Added By</td>
  145. <td>Date Added</td>
  146. <td></td>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. </tbody>
  151. </table>
  152. </div>
  153. </form>
  154. </div>
  155. </script>
  156.  
  157.  
  158. <script type="text/html" id="tmpl_userbox">
  159. <div class="userbox">
  160. <a class="close_menu query"><i class="fa fa-comment"></i>[خــاص]</a>
  161. <a class="close_menu info"><i class="fa fa-info-circle"></i>[معلومات]</a>
  162. <a class="close_menu ignore"><label><i><input type="checkbox" /></i>[حظــر]</label></a>
  163. <a class="close_menu if_op op"><i class="fa fa-star"></i>[اوب]</a>
  164. <a class="close_menu if_op deop"><i class="fa fa-star-o"></i>[نزل اوب]</a>
  165. <a class="close_menu voice"><i class="fa fa-volume-up"></i>[فى اى بى]</a>
  166. <a class="close_menu devoice"><i class="fa fa-volume-off"></i>[نزل فى اى بى]</a>
  167. <a class="close_menu kick"><i class="fa fa-times"></i>[طــرد]</a>
  168. <a class="close_menu ban"><i class="fa fa-ban"></i>[بــان]</a>
  169. </div>
  170.  
  171. </script>
  172.  
  173. <script type="text/html" id="tmpl_nickchange">
  174. <form class="nickchange">
  175. <label for="nickchange"><%= new_nick %>:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button><%= change %></button> <a class="cancel"><%= cancel %></a>
  176. </form>
  177. </script>
  178.  
  179. <script type="text/html" id="tmpl_new_connection_info">
  180. <div style="margin:1em 20px; text-align: left;">
  181. <img src="/kiwi/assets/img/mXn.png" alt="mXnChat" title="mXnChat" style="display:block; margin:0 auto;"/> <br />
  182. <p style="font-size:0.9em"
  183.  
  184. <p style="font-size:0.9em;">اسرة مكسن شات تتمنى لكم قضاء اسعد الاوقات فى الدردشة</p>
  185. </div>
  186.  
  187. </script>
  188.  
  189. <script type="text/html" id="tmpl_server_select">
  190. <div class="server_select" style="height:560px;">
  191.  
  192. <div class="side_panel" style="position:absolute;top:0px;left:320px;">
  193. <div class="content" style="position:relative;width:300px;">
  194. </div>
  195. </div>
  196.  
  197. <div class="server_details" style="position:relative;width:320px;">
  198. <div class="status">mXnChat | دردشة مكسن شات</div>
  199.  
  200. <form>
  201. <div class="basic">
  202. <table>
  203. <tr class="nick">
  204. <td><label for="server_select_nick">الأسم</label></td>
  205. <td><input type="text" class="nick" id="server_select_nick"></td>
  206. </tr>
  207.  
  208. <tr class="have_pass">
  209. <td colspan="2">
  210. <label for="server_select_show_pass">هل لديك كلمه سر ؟</label> <input type="checkbox" id="server_select_show_pass" style="width:auto;">
  211. </td>
  212. </tr>
  213.  
  214. <tr class="pass" style="display: none;">
  215. <td><label for="server_select_password">كلمة السر</label></td>
  216. <td><input type="password" class="password" id="server_select_password"></td>
  217. </tr>
  218.  
  219. الاسم المستعار بحروف إنجليزية فقط
  220. <div style="position:relative;">
  221. <input type="hidden" class="channel" id="server_select_channel" value="#arab">
  222.  
  223.  
  224.  
  225. <tr class="start">
  226. <td></td>
  227. <td><button class="remove_bg" type="submit">[دردش] </button></td> </tr>
  228. </table>
  229. </tr>
  230.  
  231.  
  232.  
  233.  
  234. يرجى الالتزام بقوانين الدردشة, يرجى قرائتها جيداً من <a href="http://mXnChat.org/rules.html">هنـا</a>
  235.  
  236. <div style="position:relative;">
  237. </div>
  238.  
  239.  
  240.  
  241. <table>
  242. <tr class="conditions">
  243. <td></td>
  244. <td>مكسن شات معا نلتقى لنرتقى</strong></a>.</td>
  245. </tr>
  246. </table>
  247.  
  248. <a href="" onclick="return false;" class="show_more"><%= server_network %> <i class="fa fa-caret-down"></i></a>
  249. </div>
  250.  
  251.  
  252. <div class="more">
  253. <table>
  254. <tr class="server">
  255. <td><label for="server_select_server"><%= server %></label></td>
  256. <td><input type="text" class="server" id="server_select_server"></td>
  257. <tr>
  258.  
  259. <tr class="port">
  260. <td><label for="server_select_port"><%= port %></label></td>
  261. <td><input type="text" class="port" id="server_select_port"></td>
  262. </tr>
  263.  
  264. <tr class="ssl">
  265. <td><label for="server_select_ssl">SSL</label></td>
  266. <td><input type="checkbox" class="ssl" id="server_select_ssl"></td>
  267. </tr>
  268. </table>
  269. </div>
  270. </form>
  271.  
  272. <a class="kiwi_logo" href="https://mXnChat.Org/" target="_blank">
  273. <h1><span><%= powered_by %></span> <img src="/kiwi/assets/img/ico.png" alt="mXnChat" title="mXnChat" /></h1>
  274. </a>
  275. </div>
  276. </div>
  277. </script>
  278.  
  279. <script type="text/html" id="tmpl_theme_thumbnail">
  280. <a class="thumbnail" data-setting="theme" data-value="<%= name.toLowerCase() %>" href="#">
  281. <div class="thumbnail_wrapper"><div class="theme_color" style="background-color: <%= thumbnail_colour %>;"></div></div>
  282. <div class="caption"><u><%= name %></u></div>
  283. </a>
  284. </script>
  285.  
  286. <script type="text/html" id="tmpl_applet_settings">
  287. <div class="settings_container">
  288. <form>
  289. <section>
  290. <h6>Theme</h6>
  291. <div class="control-group">
  292. <div class="thumbnails">
  293. <% _.forEach(theme_thumbnails, function(thumbnail) { %>
  294. <%= thumbnail %>
  295. <% }); %>
  296. </div>
  297. </div>
  298. </section>
  299.  
  300. <section>
  301. <h6>Channels</h6>
  302. <div class="control-group">
  303. <div class="radio">
  304. <label>
  305. <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="tabs">
  306. <%= tabs %>
  307. </label>
  308. </div>
  309. <div class="radio">
  310. <label>
  311. <input type="radio" name="channel_list_style" data-setting="channel_list_style" value="list">
  312. <%= list %><small class="text-muted">(<%= large_amounts_of_chans %>)</small>
  313. </label>
  314. </div>
  315. </div>
  316. </section>
  317.  
  318. <section>
  319. <h6>Chat window</h6>
  320. <div class="control-group">
  321. <div class="checkbox">
  322. <label>
  323. <input data-setting="show_joins_parts" type="checkbox">
  324. <%= join_part %>
  325. </label>
  326. </div>
  327. <div class="checkbox">
  328. <label>
  329. <input data-setting="count_all_activity" type="checkbox">
  330. <%= count_all_activity %>
  331. </label>
  332. </div>
  333. <div class="checkbox">
  334. <label>
  335. <input data-setting="show_timestamps" type="checkbox">
  336. <%= timestamps %>
  337. </label>
  338. </div>
  339. <div class="checkbox">
  340. <label>
  341. <input data-setting="use_24_hour_timestamps" type="checkbox">
  342. <%= timestamp_24 %>
  343. </label>
  344. </div>
  345. <div class="checkbox">
  346. <label>
  347. <input data-setting="mute_sounds" type="checkbox">
  348. <%= mute %>
  349. </label>
  350. </div>
  351. <div class="checkbox">
  352. <label>
  353. <input data-setting="show_emoticons" type="checkbox">
  354. <%= emoticons %>
  355. </label>
  356. </div>
  357. <!-- MODIFICACION CHECK AUTOENTRAR -->
  358. <div class="checkbox">
  359. <label>
  360. <input data-setting="auto_join" type="checkbox">
  361. <span><%= entrar_automaticamente_a_canales_oficiales %></span>
  362. </label>
  363. </div>
  364. <!-- FIN MODIFICACION -->
  365. <label>
  366. <input data-setting="scrollback" class="input-small" type="text" size="4" pattern="\d*">
  367. <span><%= scroll_history %></span>
  368. </label>
  369. <!-- MODIFICACION LIMITE PRIVADOS -->
  370. <label>
  371. <br /><input data-setting="inputmaxprivados" class="input-small" type="text" size="4" pattern="\d*">
  372. <span><%= privados_establecidos_simultaneamente %></span>
  373. </label>
  374. <!-- FIN MODIFICACION -->
  375. </div>
  376. </section>
  377.  
  378. <section class="language">
  379. <h6>Language</h6>
  380. <div class="control-group">
  381. <select data-setting="locale">
  382. <option value=""></li>
  383. <% _.forEach(languages, function(lang) { %>
  384. <option value="<%= lang.tag %>"><%= lang.language %></li>
  385. <% }); %>
  386. </select>
  387. <br>
  388. <small><%= locale_restart_needed %></small>
  389. </div>
  390. </section>
  391.  
  392. <section class="protocol_handler">
  393. <h6><%= default_client %></h6>
  394. <div class="control-group">
  395. <button class="register_protocol"><%= make_default %></button>
  396. <br>
  397. <small><%= default_note %></small>
  398. </div>
  399. </section>
  400.  
  401. <section class="notification_enabler">
  402. <h6><%= html5_notifications %></h6>
  403. <div class="control-group">
  404. <button class="enable_notifications"><%= enable_notifications %></button>
  405. </div>
  406. </section>
  407. </form>
  408. </div>
  409. </script>
  410.  
  411.  
  412. <script type="text/html" id="tmpl_channel_list">
  413. <div class="applet_chanlist">
  414. <table>
  415. <thead style="font-weight: bold;">
  416. <tr>
  417. <td><a class="channel_name_title"><%= channel_name %></a></td>
  418. <td><a class="users_title"><%= users %></a></td>
  419. <td style="padding-left: 2em;"><%= topic %></td>
  420. </tr>
  421. </thead>
  422. <tbody style="vertical-align: top;">
  423. </tbody>
  424. </table>
  425. </div>
  426. </script>
  427.  
  428.  
  429. <script type="text/html" id="tmpl_script_editor">
  430. <div style="height:100%;">
  431. <style>
  432. #kiwi .script_editor .se_toolbar { padding: 10px 20px; }
  433. #kiwi .script_editor .se_toolbar span.status { margin-left:2em; font-style:italic; }
  434. #kiwi .script_editor .se_toolbar button { height:30px; padding:0 1em; }
  435. #kiwi .script_editor .se_toolbar button i { font-size:1.2em; margin-left:3px; }
  436. </style>
  437. <div class="script_editor" style="height:100%; position:relative;">
  438. <div class="se_toolbar"><button class="btn_save"><%= save %><i class="fa fa-floppy-o"></i></button><span class="status"></span></div>
  439. <div class="editor" style="position:absolute;top:50px;bottom:0px;left:0px;right:0px;"></div>
  440. </div>
  441. </div>
  442. </script>
  443.  
  444.  
  445. <script type="text/html" id="tmpl_notifications">
  446. <div class="notification-inner">
  447. <i class="fa fa-times close"></i>
  448. <h6></h6>
  449. <div class="content"></div>
  450. </div>
  451. </script>
  452.  
  453.  
  454. <script src="/kiwi/assets/libs/jquery-1.11.1.min.js"></script>
  455.  
  456. <script src="/kiwi/assets/plugins/jslibs/jquery-ui.min.js"></script>
  457. <script src="/kiwi/assets/plugins/jslibs/jquery.alerts-1.1/jquery.alerts.js"></script>
  458. <link rel="stylesheet" type="text/css" href="/kiwi/assets/plugins/jslibs/jquery.alerts-1.1/jquery.alerts.css" />
  459. <script src="/kiwi/assets/plugins/listxml/jquery.tablesorter.min.js"></script>
  460. <link rel="stylesheet" type="text/css" href="/kiwi/assets/plugins/listxml/style.css" />
  461. <!-- PLAYER HTML5 -->
  462. <link rel="stylesheet" href="/kiwi/assets/plugins/ads/player/videojs.ads.css" />
  463. <link rel="stylesheet" href="/kiwi/assets/plugins/ads/player/videojs.ima.css" />
  464. <link href="//vjs.zencdn.net/4.12.7/video-js.css" rel="stylesheet">
  465. <script src="//vjs.zencdn.net/4.12.7/video.js"></script>
  466. <script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
  467. <script src="/kiwi/assets/plugins/ads/player/videojs.ads.js"></script>
  468. <script src="/kiwi/assets/plugins/ads/player/videojs.ima.js"></script>
  469. <!-- FIN PLAYER HTML5 -->
  470. <!-- PUBLICIDAD -->
  471. <!-- <script type="text/javascript" src="http://s0.2mdn.net/instream/html5/ima3.js"></script> -->
  472. <!-- <script type="text/javascript" src="/kiwi/assets/plugins/ads/ads.js"></script> -->
  473. <!-- FIN PUBLICIDAD -->
  474.  
  475. <script>
  476. /* Script loader (https://github.com/ded/script.js) */
  477. (function(a,b,c){typeof c["module"]!="undefined"&&c.module.exports?c.module.exports=b():typeof c["define"]!="undefined"&&c["define"]=="function"&&c.define.amd?define(a,b):c[a]=b()})("$script",function(){function p(a,b){for(var c=0,d=a.length;c<d;++c)if(!b(a[c]))return j;return 1}function q(a,b){p(a,function(a){return!b(a)})}function r(a,b,i){function o(a){return a.call?a():d[a]}function t(){if(!--n){d[m]=1,l&&l();for(var a in f)p(a.split("|"),o)&&!q(f[a],o)&&(f[a]=[])}}a=a[k]?a:[a];var j=b&&b.call,l=j?b:i,m=j?a.join(""):b,n=a.length;return setTimeout(function(){q(a,function(a){if(h[a])return m&&(e[m]=1),h[a]==2&&t();h[a]=1,m&&(e[m]=1),s(!c.test(a)&&g?g+a+".js":a,t)})},0),r}function s(c,d){var e=a.createElement("script"),f=j;e.onload=e.onerror=e[o]=function(){if(e[m]&&!/^c|loade/.test(e[m])||f)return;e.onload=e[o]=null,f=1,h[c]=2,d()},e.async=1,e.src=c,b.insertBefore(e,b.firstChild)}var a=document,b=a.getElementsByTagName("head")[0],c=/^https?:\/\//,d={},e={},f={},g,h={},i="string",j=!1,k="push",l="DOMContentLoaded",m="readyState",n="addEventListener",o="onreadystatechange";return!a[m]&&a[n]&&(a[n](l,function t(){a.removeEventListener(l,t,j),a[m]="complete"},j),a[m]="loading"),r.get=s,r.order=function(a,b,c){(function d(e){e=a.shift(),a.length?r(e,d):r(e,b,c)})()},r.path=function(a){g=a},r.ready=function(a,b,c){a=a[k]?a:[a];var e=[];return!q(a,function(a){d[a]||e[k](a)})&&p(a,function(a){return d[a]})?b():!function(a){f[a]=f[a]||[],f[a][k](b),c&&c(e)}(a.join("|")),r},r},this)
  478.  
  479. //MODIFICACION AUTOENTRAR
  480. function getUrlVars() {
  481. var vars = {};
  482. var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
  483. vars[key] = value;
  484. });
  485. return vars;
  486. }
  487. //FIN MODIFICACION
  488.  
  489. // Avoid `console` errors in browsers that lack a console. (https://github.com/h5bp/html5-boilerplate)
  490. function normalizeConsole() {
  491. var method;
  492. var noop = function () {};
  493. var methods = [
  494. 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
  495. 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
  496. 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
  497. 'timeStamp', 'trace', 'warn'
  498. ];
  499. var length = methods.length;
  500. var console = (window.console = window.console || {});
  501.  
  502. while (length--) {
  503. method = methods[length];
  504.  
  505. // Only stub undefined methods.
  506. if (!console[method]) {
  507. console[method] = noop;
  508. }
  509. }
  510. }
  511.  
  512. normalizeConsole();
  513.  
  514. function getQueryVariable(variable) {
  515. var query = window.location.search.substring(1);
  516. var vars = query.split('&');
  517. for (var i = 0; i < vars.length; i++) {
  518. var pair = vars[i].replace(/\+/g, '%20').split('=');
  519. if (decodeURIComponent(pair[0]) == variable) {
  520. return decodeURIComponent(pair[1]);
  521. }
  522. }
  523. }
  524.  
  525. (function afterPromiseAvailable() {
  526. var base_path = '/kiwi', // Entry path for the kiwi application
  527. scripts = [],
  528. opts = {
  529. container: $('body'),
  530. base_path: base_path,
  531. settings_path: base_path + '/assets/settings.json'
  532. },
  533. script_promise, script_promise_resolve,
  534. onload_promise,
  535. settings_promise;
  536.  
  537. // If the browser doesn't natively support promises load up the polyfill and try again.
  538. if (!window.Promise) {
  539. $script(base_path + "/assets/libs/promise.min.js", afterPromiseAvailable);
  540. return;
  541. }
  542.  
  543. function loadScripts(scripts) {
  544. return new Promise(function (resolve, reject) {
  545. var to_load, idx,
  546. base = base_path + '/';
  547. if (typeof scripts === 'string') {
  548. to_load = base + scripts;
  549. } else {
  550. to_load = [];
  551. for (idx in scripts) {
  552. to_load.push(base + scripts[idx]);
  553. }
  554. }
  555. $script(to_load, resolve, reject);
  556. });
  557. }
  558.  
  559. onload_promise = new Promise(function (resolve) {
  560. // Document may already be loaded if we had to load the Promise shim seperately
  561. if (document.readyState === 'complete') {
  562. resolve();
  563. return;
  564. }
  565.  
  566. window.onload = resolve;
  567. });
  568.  
  569. // Get a resolve function for the script loading promises
  570. script_promise = new Promise(function (resolve) {
  571. script_promise_resolve = resolve;
  572. });
  573.  
  574. // Chain each script loading promise
  575. script_promise = script_promise.then(function () {
  576. var idx;
  577. for (idx = 0; idx < scripts.length; idx++) {
  578. (function (idx) {
  579. script_promise = script_promise.then(function () {
  580. return loadScripts(scripts[idx]);
  581. });
  582. })(idx);
  583. }
  584. });
  585.  
  586. // Debugging will get a list of debugging scripts from settings.json (below)
  587. if (!getQueryVariable('debug')) {
  588. scripts.push(['assets/libs/lodash.min.js?t=1423511744690']);
  589. scripts.push([
  590. 'assets/libs/backbone.min.js?t=1423511744690',
  591. 'assets/libs/jed.js?t=1423511744690'
  592. ]);
  593. scripts.push([
  594. 'assets/kiwi.min.js?t=1423511744690',
  595. 'assets/libs/engine.io.bundle.min.js?t=1423511744690'
  596. ]);
  597.  
  598. script_promise_resolve();
  599. }
  600.  
  601. settings_promise = new Promise(function (resolve) {
  602. $.getJSON(opts.settings_path, function (data) {
  603. opts.server_settings = data.server_settings;
  604. opts.client_plugins = data.client_plugins;
  605. //MODIFICACION AUTOENTRAR
  606. var nick = getUrlVars()['nick'];
  607. var canal = getUrlVars()['chan'];
  608. var entrar = getUrlVars()['entrar'];
  609. if(nick && canal && entrar == 'true') {
  610. opts.client_plugins.push('/kiwi/assets/plugins/auto_connect.html');
  611. }
  612. //FIN MODIFICACION
  613. opts.translations = data.translations;
  614. opts.locale = data.locale;
  615. opts.themes = data.themes;
  616.  
  617. if (typeof data.kiwi_server !== 'undefined') {
  618. opts.kiwi_server = data.kiwi_server;
  619. }
  620.  
  621. resolve();
  622.  
  623. // If debugging, grab the debug scripts and load them
  624. if (getQueryVariable('debug')) {
  625. scripts = scripts.concat(data.scripts);
  626. script_promise_resolve();
  627. }
  628.  
  629. // Load themes
  630. if (opts.themes) {
  631. $.each(opts.themes, function (theme_idx, theme) {
  632. var disabled = (opts.server_settings.client.settings.theme.toLowerCase() !== theme.name.toLowerCase()),
  633. rel = (disabled?'alternate ':'') + 'stylesheet';
  634.  
  635. var link = $.parseHTML('<link rel="' + rel + '" type="text/css" data-theme href="'+ opts.base_path + '/assets/themes/' + theme.name.toLowerCase() + '/style.css" title="' + theme.name.toLowerCase() + '" ' + (disabled?'disabled':'') + '/>');
  636. link.disabled = disabled;
  637.  
  638. $(link).appendTo($('head'));
  639. });
  640. }
  641. });
  642. });
  643.  
  644. // prawnsalad: Why is the below script_promise in its own .then()?
  645. // M2Ys4U: prawnsalad: either of the first two promises can resolve the
  646. // third one, but the third one has a then() on it already, so the
  647. // then() on the all() makes it wait for the then() on the script promise
  648. // to resolve.
  649. //
  650. // Promises - simple.
  651. Promise.all([onload_promise, settings_promise])
  652. .then(function(){return script_promise})
  653. .then(function startApp() {
  654. // Kiwi IRC version this is built from
  655. kiwi.build_version = '0.9.0';
  656.  
  657. // Start the app after loading plugins
  658. kiwi.init(opts, function() {
  659. if (opts.client_plugins && opts.client_plugins.length > 0) {
  660.  
  661. // Wait until all plugins are loaded before starting the app
  662. kiwi.plugins.once('loaded', function() {
  663. kiwi.start();
  664. });
  665.  
  666. _.each(opts.client_plugins, function (plugin_url) {
  667. kiwi.plugins.load(plugin_url);
  668. });
  669.  
  670. } else {
  671.  
  672. // No plugins were needed so start the app
  673.  
  674. kiwi.start();
  675.  
  676.  
  677. }
  678. });
  679. });
  680. })();
  681. </script>
  682. </body>
  683. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement