Hormold

VK Change (#1377682213)

Aug 28th, 2013
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 64.76 KB | None | 0 0
  1. Файл - profile.css (Старый размер - 19937 | Новый - 0):
  2. 0.  - #profile_css {
  3. 1.  -   display: none;
  4. 2.  - }
  5. 3.  -
  6. 4.  - #profile {
  7. 5.  -   padding: 10px 10px 0px;
  8. 6.  - }
  9. 7.  - #profile a {
  10. 8.  -   outline: none;
  11. 9.  - }
  12. 10.  - #profile h4 a {
  13. 11.  -   color: #45688E;
  14. 12.  - }
  15. 13.  - #profile h4 a.fl_r {
  16. 14.  -   color: #2B587A;
  17. 15.  - }
  18. 16.  -
  19. 17.  - .closed_profile {
  20. 18.  -   margin-bottom: 10px;
  21. 19.  - }
  22. 20.  -
  23. 21.  - #profile_full_info {
  24. 22.  -   padding-bottom: 10px;
  25. 23.  - }
  26. 24.  -
  27. 25.  - .profile_no_info .labeled {
  28. 26.  -   color: #777;
  29. 27.  - }
  30. 28.  - .profile_info {
  31. 29.  -   line-height: 140%;
  32. 30.  -   padding: 10px 6px 15px;
  33. 31.  - }
  34. 32.  - .profile_info .label {
  35. 33.  -   width: 135px;
  36. 34.  -   color: #777;
  37. 35.  - }
  38. 36.  - .profile_info .labeled {
  39. 37.  -   width: 250px;
  40. 38.  -   overflow: hidden;
  41. 39.  - }
  42. 40.  - .profile_info .block {
  43. 41.  -   padding-top: 10px;
  44. 42.  - }
  45. 43.  - .profile_info .miniblock {
  46. 44.  -   padding-top: 3px;
  47. 45.  - }
  48. 46.  - .profile_info .relation_request {
  49. 47.  -   position: relative;
  50. 48.  - }
  51. 49.  - .profile_info .relation_request small, .profile_info .relation_request .sdivide {
  52. 50.  -   color: #777;
  53. 51.  - }
  54. 52.  - .profile_info .relation_request .progress {
  55. 53.  -   position: absolute;
  56. 54.  -   left: 0px;
  57. 55.  -   top: 2px;
  58. 56.  - }
  59. 57.  - #profile_no_wall div {
  60. 58.  -   padding-bottom: 15px;
  61. 59.  -   text-align: center;
  62. 60.  -   color: #777;
  63. 61.  - }
  64. 62.  -
  65. 63.  - #profile_no_lohotron,
  66. 64.  - #profile_notification {
  67. 65.  -   line-height: 160%;
  68. 66.  -   background: #F7F7F7;
  69. 67.  -   border-top: 1px solid #DAE1E8;
  70. 68.  -   border-bottom: 1px solid #DAE1E8;
  71. 69.  -   padding: 10px;
  72. 70.  -   margin-bottom: 10px;
  73. 71.  - }
  74. 72.  - #profile_no_lohotron .hide_notice_wrap, #profile_notification .hide_notice_wrap {
  75. 73.  -   height: 13px;
  76. 74.  -   width: 17px;
  77. 75.  - }
  78. 76.  - #profile_no_lohotron .hide_notice, #profile_notification .hide_notice {
  79. 77.  -   background: #C4D2E1 url("/images/icons/xicon_f7.gif") no-repeat;
  80. 78.  -   cursor: pointer;
  81. 79.  -   height: 17px;
  82. 80.  -   width: 17px;
  83. 81.  - }
  84. 82.  - #profile_notification_top {
  85. 83.  -   padding: 12px 10px;
  86. 84.  -   background: #F7F7F7;
  87. 85.  -   border-bottom: 1px solid #D9E0E7;
  88. 86.  -   line-height: 160%;
  89. 87.  - }
  90. 88.  - #profile_view_as {
  91. 89.  -   display: none;
  92. 90.  -   line-height: 150%;
  93. 91.  -   background: #F7F7F7;
  94. 92.  -   border: solid #DAE1E8;
  95. 93.  -   border-width: 0px 1px 1px;
  96. 94.  -   padding: 15px 20px 20px;
  97. 95.  -   margin: 0px 1px;
  98. 96.  - }
  99. 97.  - #profile_view_as a.fl_l {
  100. 98.  -   margin-left: 80px;
  101. 99.  - }
  102. 100.  - #profile_view_as .info {
  103. 101.  -   margin-left: 145px;
  104. 102.  -   padding-top: 5px;
  105. 103.  - }
  106. 104.  - #profile_view_as .can_view_as {
  107. 105.  -   padding-top: 8px;
  108. 106.  - }
  109. 107.  - #profile_view_as .can_view_as_dd {
  110. 108.  -   position: relative;
  111. 109.  -   padding-top: 15px;
  112. 110.  - }
  113. 111.  - #profile_view_as .can_view_as_btn {
  114. 112.  -   height: 25px;
  115. 113.  -   padding-top: 15px;
  116. 114.  - }
  117. 115.  - #view_as_dd {
  118. 116.  -   width: 363px;
  119. 117.  - }
  120. 118.  - #view_as_inp {
  121. 119.  -   width: 330px;
  122. 120.  - }
  123. 121.  -
  124. 122.  - .profile_warning {
  125. 123.  -   cursor: pointer;
  126. 124.  -   line-height: 150%;
  127. 125.  -   padding: 18px 15px;
  128. 126.  -   background: #F7F7F7;
  129. 127.  -   border: 1px solid #CCC;
  130. 128.  -   border-left: 2px solid #AA5533;
  131. 129.  -   margin-bottom: 10px;
  132. 130.  - }
  133. 131.  - #profile_warning_full {
  134. 132.  -   display: none;
  135. 133.  -   margin-top: 13px;
  136. 134.  - }
  137. 135.  - #profile_warning_full .old_info {
  138. 136.  -   text-align: center;
  139. 137.  - }
  140. 138.  - #profile_warning_full td {
  141. 139.  -   vertical-align: top;
  142. 140.  - }
  143. 141.  - #profile_warning_full td div {
  144. 142.  -   font-size: 0.9em;
  145. 143.  - }
  146. 144.  - #profile_warning_full .about {
  147. 145.  -   padding: 0px 20px;
  148. 146.  - }
  149. 147.  -
  150. 148.  - #profile_photos {
  151. 149.  -   margin: 5px -1px 12px;
  152. 150.  -   width: 397px;
  153. 151.  - }
  154. 152.  - #profile_photos .profile_sized_photos {
  155. 153.  -   margin: 0px;
  156. 154.  -   padding: 0px 1px;
  157. 155.  - }
  158. 156.  - #profile_photos .profile_wide_sized_photos,
  159. 157.  - .page_wide_no_narrow .profile_sized_photos {
  160. 158.  -   display: none;
  161. 159.  - }
  162. 160.  - .page_wide_no_narrow #profile_photos .profile_wide_sized_photos {
  163. 161.  -   display: block;
  164. 162.  - }
  165. 163.  - .profile_wide_sized_photos a.page_post_thumb_wrap {
  166. 164.  -   margin-right: 6px;
  167. 165.  - }
  168. 166.  - #profile_photos_table {
  169. 167.  -   margin: 0px auto;
  170. 168.  - }
  171. 169.  - .profile_photo_lnk {
  172. 170.  -   position: relative;
  173. 171.  -   display: block;
  174. 172.  -   margin: 0px 3px 0px 2px;
  175. 173.  -   width: 75px;
  176. 174.  -   height: 57px;
  177. 175.  -   overflow: hidden;
  178. 176.  -   text-align: center;
  179. 177.  -   background: #F1F1F1;
  180. 178.  - }
  181. 179.  - .profile_photo_lnk:hover {
  182. 180.  -   text-decoration: none;
  183. 181.  - }
  184. 182.  - .profile_photo_img {
  185. 183.  -   margin: 0px auto;
  186. 184.  - }
  187. 185.  - .profile_photo_hide_wrap {
  188. 186.  -   position: absolute;
  189. 187.  -   z-index: 10;
  190. 188.  -   right: 0px;
  191. 189.  -   top: 0px;
  192. 190.  -   background: #222;
  193. 191.  -   background: rgba(0, 0, 0, 0.5);
  194. 192.  -   padding: 3px;
  195. 193.  -   cursor: pointer;
  196. 194.  -   opacity: 0;
  197. 195.  -   filter: alpha(opacity=0);
  198. 196.  -   -webkit-border-radius: 3px;
  199. 197.  -   -moz-border-radius: 3px;
  200. 198.  -   border-radius: 3px;
  201. 199.  -   -webkit-transition: opacity 100ms linear;
  202. 200.  -   -moz-transition: opacity 100ms linear;
  203. 201.  -   -o-transition: opacity 100ms linear;
  204. 202.  -   transition: opacity 100ms linear;
  205. 203.  - }
  206. 204.  - a:hover .profile_photo_hide_wrap {
  207. 205.  -   opacity: 1;
  208. 206.  -   filter: alpha(opacity=100);
  209. 207.  - }
  210. 208.  - .profile_photo_hide {
  211. 209.  -   background: url(/images/notifier_close.gif) no-repeat;
  212. 210.  -   width: 7px;
  213. 211.  -   height: 7px;
  214. 212.  -   opacity: 0.5;
  215. 213.  -   filter: alpha(opacity=50);
  216. 214.  -   -webkit-transition: opacity 100ms linear;
  217. 215.  -   -moz-transition: opacity 100ms linear;
  218. 216.  -   -o-transition: opacity 100ms linear;
  219. 217.  -   transition: opacity 100ms linear;
  220. 218.  - }
  221. 219.  - .profile_photo_hide_wrap:hover .profile_photo_hide {
  222. 220.  -   opacity: 1;
  223. 221.  -   filter: alpha(opacity=100);
  224. 222.  - }
  225. 223.  -
  226. 224.  - #profile_photos_module .msg {
  227. 225.  -   margin: 0px 0px 12px;
  228. 226.  - }
  229. 227.  - #profile_photos_module .msg img {
  230. 228.  -   display: none;
  231. 229.  - }
  232. 230.  -
  233. 231.  - .profile_no_ava {
  234. 232.  -   width: 200px;
  235. 233.  -   height: 200px;
  236. 234.  - }
  237. 235.  -
  238. 236.  - .guest_action_link {
  239. 237.  -   color: #666;
  240. 238.  - }
  241. 239.  - .guest_actions {
  242. 240.  -   line-height: 160%;
  243. 241.  -   text-align: center;
  244. 242.  -   padding: 11px 0px 12px;
  245. 243.  -   color: #666;
  246. 244.  - }
  247. 245.  - .friend_status_info {
  248. 246.  -   color: #666;
  249. 247.  -   padding: 4px 6px;
  250. 248.  -   cursor: default;
  251. 249.  - }
  252. 250.  - #profile_main_actions .friend_status_info {
  253. 251.  -   padding: 11px 0px 12px;
  254. 252.  -   text-align: center;
  255. 253.  - }
  256. 254.  - #profile_main_actions {
  257. 255.  -   margin: 8px 0px 9px;
  258. 256.  -   padding: 4px 8px;
  259. 257.  -   background: #F1F1F1;
  260. 258.  - }
  261. 259.  - .profile_top_sep {
  262. 260.  -   margin: 5px 0px;
  263. 261.  -   height: 1px;
  264. 262.  -   overflow: hidden;
  265. 263.  -   background: #E7EAED;
  266. 264.  - }
  267. 265.  - .profile_action_btn {
  268. 266.  -   padding: 4px 0px;
  269. 267.  - }
  270. 268.  - .profile_action_btn button {
  271. 269.  -   line-height: 1.45em;
  272. 270.  -   padding-left: 2px;
  273. 271.  -   padding-right: 2px;
  274. 272.  - }
  275. 273.  - .profile_msg_split .cut_left {
  276. 274.  -   width: 151px;
  277. 275.  -   float: left;
  278. 276.  - }
  279. 277.  - .profile_msg_split .cut_left button {
  280. 278.  -   border-right: 1px solid #7496B9;
  281. 279.  -   height: 27px;
  282. 280.  - }
  283. 281.  - .profile_msg_split .cut_right {
  284. 282.  -   width: 31px;
  285. 283.  -   float: left;
  286. 284.  - }
  287. 285.  - .profile_msg_split .cut_right button {
  288. 286.  -   border-right: 1px solid #5E82A7;
  289. 287.  -   line-height: 0.9em;
  290. 288.  -   height: 27px;
  291. 289.  -   padding: 6px 0;
  292. 290.  - }
  293. 291.  - .profile_msg_none {
  294. 292.  -   display: none;
  295. 293.  - }
  296. 294.  - .profile_call_text {
  297. 295.  -   display: none;
  298. 296.  - }
  299. 297.  - .profile_msg_call .profile_call_text {
  300. 298.  -   display: inline;
  301. 299.  - }
  302. 300.  - .profile_msg_call .profile_call_icon,
  303. 301.  - .profile_msg_call .cut_left {
  304. 302.  -   display: none;
  305. 303.  - }
  306. 304.  - .profile_msg_msg .cut_right {
  307. 305.  -   display: none;
  308. 306.  - }
  309. 307.  -
  310. 308.  -
  311. 309.  - #profile_bottom_actions {
  312. 310.  -   padding: 5px 0px;
  313. 311.  -   width: 190px;
  314. 312.  -   border-top: 1px solid #E7EAED;
  315. 313.  - }
  316. 314.  - #profile_bottom_actions a {
  317. 315.  -   background: #FFF;
  318. 316.  -   display: block;
  319. 317.  -   width: 178px;
  320. 318.  -   padding: 4px 6px;
  321. 319.  - }
  322. 320.  - #profile_actions a {
  323. 321.  -   background: #FFF;
  324. 322.  -   display: block;
  325. 323.  -   width: 188px;
  326. 324.  -   padding: 4px 6px;
  327. 325.  - }
  328. 326.  - #profile_actions a:hover, #profile_bottom_actions a:hover {
  329. 327.  -   text-decoration: none;
  330. 328.  -   background: #E1E7ED;
  331. 329.  - }
  332. 330.  - #profile_actions a span.other {
  333. 331.  -   padding-right: 12px;
  334. 332.  -   background: url(/images/darr_on.gif) no-repeat right 6px;
  335. 333.  - }
  336. 334.  -
  337. 335.  - #profile_idols.page_list_module .line_cell .desc_info {
  338. 336.  -   padding: 6px 8px 0px;
  339. 337.  -   width: 134px;
  340. 338.  - }
  341. 339.  - #profile_idols.page_list_module .people_desc {
  342. 340.  -   color: #777;
  343. 341.  -   width: 300px;
  344. 342.  -   overflow: hidden;
  345. 343.  - }
  346. 344.  -
  347. 345.  - .gifts_list_module a span.fl_l,
  348. 346.  - .counts_module div a .fl_r {
  349. 347.  -   height: 11px;
  350. 348.  -   color: #8495a6;
  351. 349.  -   font-size: 0.9em;
  352. 350.  -   padding-top: 1px;
  353. 351.  -   margin: 3px 2px 0px;
  354. 352.  -   line-height: 100%;
  355. 353.  - }
  356. 354.  - .gifts_list_module a .fl_r {
  357. 355.  -   padding: 0px;
  358. 356.  -   margin: 0px;
  359. 357.  - }
  360. 358.  - .gifts_list_module a span.fl_l {
  361. 359.  -   margin: 0px 1px;
  362. 360.  -   color: #8495A6;
  363. 361.  - }
  364. 362.  - .gifts_list_module a span.thumb,
  365. 363.  - .counts_module div a span.thumb {
  366. 364.  -   background: url(/images/profile_icons.gif?10) no-repeat;
  367. 365.  -   margin: 3px 0px 0px;
  368. 366.  -   width: 14px;
  369. 367.  - }
  370. 368.  - .gifts_list_module a span .thumb {
  371. 369.  -   background-position: 2px -34px;
  372. 370.  -   height: 11px;
  373. 371.  -   margin: 0;
  374. 372.  - }
  375. 373.  - .counts_module .photos .thumb {
  376. 374.  -   background-position: center 2px;
  377. 375.  - }
  378. 376.  - .counts_module .videos .thumb {
  379. 377.  -   background-position: center -10px;
  380. 378.  - }
  381. 379.  - .counts_module .fans .thumb {
  382. 380.  -   background-position: center -22px;
  383. 381.  - }
  384. 382.  - .counts_module .gifts .thumb {
  385. 383.  -   background-position: center -34px;
  386. 384.  - }
  387. 385.  - .counts_module .idols .thumb {
  388. 386.  -   background-position: center -47px;
  389. 387.  - }
  390. 388.  - .counts_module .notes .thumb {
  391. 389.  -   background-position: center -58px;
  392. 390.  - }
  393. 391.  - .counts_module .wishes .thumb {
  394. 392.  -   background-position: center -58px;
  395. 393.  - }
  396. 394.  -
  397. 395.  - #profile .narrow_column .module_body {
  398. 396.  -   border-right: 1px solid #f1f1f1;
  399. 397.  - }
  400. 398.  - #profile .narrow_column .header_bottom {
  401. 399.  -   border-right: 1px solid #f1f1f1;
  402. 400.  - }
  403. 401.  - #profile .narrow_column .header_top {
  404. 402.  -   border-right: 1px solid #DEE5EB;
  405. 403.  - }
  406. 404.  -
  407. 405.  - #profile #profile_idols .module_body {
  408. 406.  -   padding: 5px 0px 10px 0px;
  409. 407.  - }
  410. 408.  -
  411. 409.  - #profile_gifts .module_body {
  412. 410.  -   padding: 8px 0px 10px;
  413. 411.  -   text-align: center;
  414. 412.  -   white-space: nowrap;
  415. 413.  - }
  416. 414.  - #profile_gifts .header_top {
  417. 415.  -   padding: 4px 6px;
  418. 416.  - }
  419. 417.  - #gifts_module_header {
  420. 418.  -   padding: 0 2px;
  421. 419.  - }
  422. 420.  -
  423. 421.  - .counts_module div a.gifts_inverted,
  424. 422.  - .counts_module div a.gifts_inverted:hover {
  425. 423.  -   background-color: #597da3;
  426. 424.  -   color: #FFFFFF;
  427. 425.  - }
  428. 426.  - .gifts_list_module .module_inverted span.fl_l,
  429. 427.  - .module_inverted .header_top .right_link {
  430. 428.  -   color: #99adc2;
  431. 429.  - }
  432. 430.  - .gifts_list_module .module_inverted span .thumb {
  433. 431.  -   background-position: 2px -85px;
  434. 432.  - }
  435. 433.  - .counts_module .gifts_inverted .thumb {
  436. 434.  -   background-position: center -85px;
  437. 435.  - }
  438. 436.  - .module_inverted_loading #gifts_module_header,
  439. 437.  - .gifts_inverted_loading .profile_gifts_send {
  440. 438.  -   background: #597DA3 url('/images/upload_inv_mini.gif') right 5px no-repeat;
  441. 439.  -   padding-right: 23px;
  442. 440.  - }
  443. 441.  - .gifts_inverted_loading .profile_gifts_send {
  444. 442.  -   background-position: right 7px;
  445. 443.  - }
  446. 444.  - .gifts_inverted_loading {
  447. 445.  -   background-position: 176px 9px;
  448. 446.  - }
  449. 447.  -
  450. 448.  - .module_body .more {
  451. 449.  -   display: none;
  452. 450.  - }
  453. 451.  -
  454. 452.  - #profile_groups .module_body {
  455. 453.  -   width: 183px;
  456. 454.  -   padding: 5px 8px;
  457. 455.  -   outline: none;
  458. 456.  - }
  459. 457.  - #profile_groups .thumb img {
  460. 458.  -   width: 16px;
  461. 459.  -   display: block;
  462. 460.  - }
  463. 461.  - #profile_groups .thumb {
  464. 462.  -   height: 16px;
  465. 463.  -   width: 16px;
  466. 464.  -   overflow: hidden;
  467. 465.  - }
  468. 466.  - #profile_groups .line_cell {
  469. 467.  -   display: block;
  470. 468.  -   padding: 3px 0px;
  471. 469.  -   margin: 0px 0px;
  472. 470.  - }
  473. 471.  - #profile_groups .info {
  474. 472.  -   padding: 1px 6px 0px;
  475. 473.  -   width: 145px;
  476. 474.  -   overflow: hidden;
  477. 475.  -   /*height:14px;*/
  478. 476.  - }
  479. 477.  - #profile_groups .more_link {
  480. 478.  -   display: block;
  481. 479.  -   text-align: center;
  482. 480.  -   border-top: 1px solid #E8EAF2;
  483. 481.  -   margin: 5px 0px 0px;
  484. 482.  -   padding: 4px 30px 5px;
  485. 483.  - }
  486. 484.  - #profile_groups .more_link:hover {
  487. 485.  -   border-top: 1px solid #D9E1E6;
  488. 486.  -   background: #E9EDF1;
  489. 487.  -   text-decoration: none;
  490. 488.  - }
  491. 489.  - #profile_fans .module_body {
  492. 490.  -   padding: 8px 0px 14px;
  493. 491.  - }
  494. 492.  -
  495. 493.  - .app .install_flash_wrap {
  496. 494.  -   padding: 60px 60px;
  497. 495.  -   visibility: hidden;
  498. 496.  - }
  499. 497.  - .app .install_button {
  500. 498.  -   text-align: center;
  501. 499.  -   margin: 20px;
  502. 500.  - }
  503. 501.  - .app input.install_flash {
  504. 502.  -   width: 100%;
  505. 503.  -   font-size: 1.09em;
  506. 504.  -   background-position: 0px -13px;
  507. 505.  -   padding: 6px 18px;
  508. 506.  -   *padding-bottom: 5px;
  509. 507.  - }
  510. 508.  - .app input.install_flash:hover {
  511. 509.  -  background-position: 0px -5px;
  512. 510.  - }
  513. 511.  -
  514. 512.  - .app .flash_api_external {
  515. 513.  -   position: absolute;
  516. 514.  - }
  517. 515.  - .graffiti, .graffiti img {
  518. 516.  -   width: 586px;
  519. 517.  -   /*height: 293px;*/
  520. 518.  - }
  521. 519.  -
  522. 520.  - .profile_box .error, .profile_box .info_msg {
  523. 521.  -   margin-bottom: 15px;
  524. 522.  - }
  525. 523.  - .profile_box .error {
  526. 524.  -   display: none;
  527. 525.  - }
  528. 526.  - #profile_new_photo {
  529. 527.  -   padding: 16px 14px;
  530. 528.  - }
  531. 529.  - #profile_new_photo .additional {
  532. 530.  -   margin-top: 15px;
  533. 531.  -   font-size: 0.9em;
  534. 532.  - }
  535. 533.  -
  536. 534.  - #profile_edit_photo .column {
  537. 535.  -   padding: 0px 7px;
  538. 536.  - }
  539. 537.  - #profile_edit_small_photos {
  540. 538.  -   width: 179px;
  541. 539.  - }
  542. 540.  - #profile_edit_preview50, #profile_edit_preview100 {
  543. 541.  -   width: 50px;
  544. 542.  -   height: 50px;
  545. 543.  -   overflow: hidden;
  546. 544.  -   text-align: left; /* Even for rtl langs */
  547. 545.  -   direction: ltr;
  548. 546.  - }
  549. 547.  - #profile_edit_preview100 {
  550. 548.  -   width: 100px;
  551. 549.  -   height: 100px;
  552. 550.  - }
  553. 551.  - #profile_edit_small_photos .fl_l {
  554. 552.  -   padding: 0px 7px 10px;
  555. 553.  - }
  556. 554.  - #profile_edit_small_photos h4 {
  557. 555.  -   margin-bottom: 10px;
  558. 556.  - }
  559. 557.  - #profile_edit_photo .fl_l img {
  560. 558.  -   cursor: move;
  561. 559.  - }
  562. 560.  -
  563. 561.  - .notes_module .module_body {
  564. 562.  -   padding: 10px 5px 10px;
  565. 563.  - }
  566. 564.  - .notes_module .icon {
  567. 565.  -   width: 11px;
  568. 566.  -   height: 17px;
  569. 567.  -   background: url(/images/note.gif) no-repeat;
  570. 568.  -   padding: 0px 5px;
  571. 569.  - }
  572. 570.  - .notes_module .info {
  573. 571.  -   width: 163px;
  574. 572.  - }
  575. 573.  - .notes_module small {
  576. 574.  -   color: #777;
  577. 575.  - }
  578. 576.  - .notes_module .note_row {
  579. 577.  -   padding: 0 0 6px;
  580. 578.  - }
  581. 579.  -
  582. 580.  - .profile_info_link, #profile_groups_link {
  583. 581.  -   display: block;
  584. 582.  -   padding: 8px 0px 9px 142px;
  585. 583.  - }
  586. 584.  - .profile_info_link:hover, #profile_groups_link:hover {
  587. 585.  -   text-decoration: none;
  588. 586.  -   background: #E9EDF1;
  589. 587.  - }
  590. 588.  - #profile_groups_link {
  591. 589.  -   margin: 5px -6px 0px;
  592. 590.  - }
  593. 591.  - #profile_groups_prg {
  594. 592.  -   margin: 0px 55px;
  595. 593.  -   height: 15px;
  596. 594.  -   display: block;
  597. 595.  - }
  598. 596.  - #profile_info {
  599. 597.  -   padding-bottom: 10px;
  600. 598.  - }
  601. 599.  - #profile_info .profile_info {
  602. 600.  -   padding-bottom: 5px;
  603. 601.  - }
  604. 602.  - div.profile_grad {
  605. 603.  -   max-width: 385px;
  606. 604.  -   overflow: hidden;
  607. 605.  -   font-size: 11px;
  608. 606.  -   font-weight: normal;
  609. 607.  -   color: #000;
  610. 608.  - }
  611. 609.  - .font_medium div.profile_grad {
  612. 610.  -   font-size: 12px;
  613. 611.  - }
  614. 612.  -
  615. 613.  - #profile .rate_line {
  616. 614.  -   padding-top: 10px;
  617. 615.  -   height: 18px;
  618. 616.  -   margin-bottom: 12px;
  619. 617.  -   cursor: pointer;
  620. 618.  - }
  621. 619.  - #profile .rate_line .rate_text {
  622. 620.  -   position: absolute;
  623. 621.  -   color: #8BA1BC;
  624. 622.  -   width: 200px;
  625. 623.  -   text-align: center;
  626. 624.  -   padding-top: 2px;
  627. 625.  -   z-index: 2;
  628. 626.  - }
  629. 627.  - #profile .rate_line .rate_left {
  630. 628.  -   background-color: #DEE5EB;
  631. 629.  -   height: 18px;
  632. 630.  -   z-index: -1;
  633. 631.  - }
  634. 632.  - #profile .rate_line .rate_right {
  635. 633.  -   background-color: #F1F1F1;
  636. 634.  -   height: 18px;
  637. 635.  -   z-index: -1;
  638. 636.  - }
  639. 637.  - #profile .rate_line.stage1 .rate_text {
  640. 638.  -   /* color: #AAA26C; */
  641. 639.  - }
  642. 640.  - #profile .rate_line.stage1 .rate_left {
  643. 641.  -   /* background-color: #E0D7A3; */
  644. 642.  -   /* border-color: #CCC490; */
  645. 643.  -   background-color: #99adc2;
  646. 644.  -   border-color: #7A9CC1;
  647. 645.  - }
  648. 646.  - #profile .rate_line.stage1 .rate_right {
  649. 647.  -   /* background-color: #F5EBBB; */
  650. 648.  -   /* border-color: #E2DAA6; */
  651. 649.  -   background-color: #DAE2E8;
  652. 650.  -   border-color: #C0CCD9;
  653. 651.  - }
  654. 652.  - #profile .rate_empty_line {
  655. 653.  -   height: 10px;
  656. 654.  - }
  657. 655.  - .profile_rate_warning {
  658. 656.  -   padding-bottom: 10px;
  659. 657.  -   overflow: hidden;
  660. 658.  - }
  661. 659.  - .profile_rate_warning .warning_row {
  662. 660.  -   display: block;
  663. 661.  -   height: 22px;
  664. 662.  - }
  665. 663.  - .profile_rate_warning .warning_row:hover {
  666. 664.  -   text-decoration: none;
  667. 665.  -   background: #E9EDF1;
  668. 666.  - }
  669. 667.  - .profile_rate_warning .warning_row .img {
  670. 668.  -   width: 11px;
  671. 669.  -   height: 12px;
  672. 670.  -   margin: 5px;
  673. 671.  -   background: url(/images/icons/mono_iconset.gif?8) no-repeat left top;
  674. 672.  - }
  675. 673.  - .profile_rate_warning .warning_row .label {
  676. 674.  -   padding: 4px;
  677. 675.  -   width: 130px;
  678. 676.  -   white-space: nowrap;
  679. 677.  -   overflow: hidden;
  680. 678.  - }
  681. 679.  - .profile_rate_warning .warning_row .plus {
  682. 680.  -   color: #8495A6;
  683. 681.  -   margin: 4px;
  684. 682.  - }
  685. 683.  - #rate_warning_photo div.img {
  686. 684.  -   background-position: 0px -29px;
  687. 685.  - }
  688. 686.  - #rate_warning_frnds div.img {
  689. 687.  -   background-position: 0px -89px;
  690. 688.  - }
  691. 689.  - #rate_warning_clubs div.img {
  692. 690.  -   background-position: 0px -119px;
  693. 691.  - }
  694. 692.  - #rate_warning_posts div.img {
  695. 693.  -   background-position: 0px -192px;
  696. 694.  - }
  697. 695.  - #rate_warning_info div.img {
  698. 696.  -   background-position: 0px -104px;
  699. 697.  - }
  700. 698.  - #rate_warning_prsn div.img {
  701. 699.  -   background-position: 0px -320px;
  702. 700.  - }
  703. 701.  - #rate_warning_card div.img {
  704. 702.  -   background-position: 0px -307px;
  705. 703.  - }
  706. 704.  -
  707. 705.  - #profile_full_info h4 {
  708. 706.  -   border-bottom: none;
  709. 707.  -   height: 4px;
  710. 708.  -   border-bottom: 1px solid #DAE1E8;
  711. 709.  -   margin-bottom: 3px;
  712. 710.  - }
  713. 711.  - #profile_full_info h4 b {
  714. 712.  -   background: #FFFFFF;
  715. 713.  -   padding: 0px 6px;
  716. 714.  - }
  717. 715.  - #profile_full_info h4 a.fl_r, #profile_full_info h4 a.fl_l {
  718. 716.  -   text-transform: none;
  719. 717.  -   background: #FFFFFF;
  720. 718.  -   color: #A3B0BC;
  721. 719.  -   padding: 0px 2px 0px 6px;
  722. 720.  -   font-style: normal;
  723. 721.  -   font-size: 0.9em;
  724. 722.  - }
  725. 723.  -
  726. 724.  - #profile_class {
  727. 725.  -   position: relative;
  728. 726.  - }
  729. 727.  - #profile_class_hint {
  730. 728.  -   position: absolute;
  731. 729.  -   z-index: 10;
  732. 730.  - }
  733. 731.  - #profile_class_hint .pointer {
  734. 732.  -   background: url(/images/classhint.gif) no-repeat 0px 0px;
  735. 733.  -   width: 60px;
  736. 734.  -   height: 52px;
  737. 735.  - }
  738. 736.  - #profile_class_hint .content {
  739. 737.  -   padding: 8px 10px 12px;
  740. 738.  -   height: 29px;
  741. 739.  -   width: 196px;
  742. 740.  -   overflow: hidden;
  743. 741.  -   border: solid #ADBCCB;
  744. 742.  -   border-width: 1px 1px 1px 0px;
  745. 743.  -   background: #FFF;
  746. 744.  -   line-height: 160%;
  747. 745.  - }
  748. 746.  - #profile_class_hint .bottom {
  749. 747.  -   height: 1px;
  750. 748.  -   overflow: hidden;
  751. 749.  -   background: #000;
  752. 750.  -   opacity: 0.1;
  753. 751.  -   filter: alpha(opacity=10);
  754. 752.  - }
  755. 753.  -
  756. 754.  - #profile_fast_chat {
  757. 755.  -   display: none;
  758. 756.  - }
  759. 757.  -
  760. 758.  - #profile_photo_upload {
  761. 759.  -   margin: 15px 0 0;
  762. 760.  -   text-align: center;
  763. 761.  - }
  764. 762.  - .profile_upload_progress_wrap {
  765. 763.  -   width: 250px;
  766. 764.  -   height: 18px;
  767. 765.  -   margin: auto;
  768. 766.  -   background: #FFF;
  769. 767.  -   border: 1px solid #CCC;
  770. 768.  - }
  771. 769.  - .profile_upload_progress {
  772. 770.  -   height: 18px;
  773. 771.  -   background: #597DA3 url(/images/progress_grad.gif) repeat;
  774. 772.  -   border: 1px solid #45688E;
  775. 773.  -   margin: -1px;
  776. 774.  - }
  777. 775.  -
  778. 776.  - .profile_deleted {
  779. 777.  -   color: #888;
  780. 778.  -   padding: 3px 1px;
  781. 779.  -   font-weight: normal;
  782. 780.  - }
  783. 781.  - .profile_deleted_text {
  784. 782.  -   text-align: center;
  785. 783.  -   color: #777;
  786. 784.  -   font-size: 1.18em;
  787. 785.  -   padding: 65px 0px;
  788. 786.  -   line-height: 140%;
  789. 787.  - }
  790. 788.  - .profile_blocked {
  791. 789.  -   margin: 0 auto;
  792. 790.  -   padding: 20px 0 60px 0;
  793. 791.  -   width: 420px;
  794. 792.  -   text-align: center;
  795. 793.  -   font-size: 1.09em;
  796. 794.  -   color: #111;
  797. 795.  -   line-height: 160%;
  798. 796.  - }
  799. 797.  -
  800. 798.  - .pit_label {
  801. 799.  -   width: 220px;
  802. 800.  -   color: #777;
  803. 801.  -   padding: 4px 10px 0px;
  804. 802.  - }
  805. 803.  - .pit_details {
  806. 804.  -   padding: 4px 10px 0px;
  807. 805.  - }
  808. 806.  - .pit_row {
  809. 807.  -   padding-top: 5px;
  810. 808.  - }
  811. 809.  - .pit_bday, .pit_bmonth {
  812. 810.  -   padding-right: 5px;
  813. 811.  - }
  814. 812.  -
  815. 813.  - .profile_label_link {
  816. 814.  -   color: #777;
  817. 815.  - }
  818. 816.  -
  819. 817.  - .profile_about_webcam {
  820. 818.  -   line-height: 160%;
  821. 819.  -   padding-top: 20px;
  822. 820.  - }
  823. 821.  - #profile_gifts .giftImg {
  824. 822.  -   width: 48px;
  825. 823.  -   height: 48px;
  826. 824.  - }
  827. 825.  - .vcall_tt table .tt_text {
  828. 826.  -   line-height: 150%;
  829. 827.  -   color: #000;
  830. 828.  -   padding: 10px 13px;
  831. 829.  -   width: 260px;
  832. 830.  - }
  833. 831.  - .vcall_tt_pointer {
  834. 832.  -   margin-top: -5px;
  835. 833.  -   background: url(/images/ddtooltip.png) 0 0 no-repeat;
  836. 834.  -   width: 8px;
  837. 835.  -   height: 11px;
  838. 836.  -   position: absolute;
  839. 837.  -   left: -7px;
  840. 838.  -   top: 50%;
  841. 839.  -   overflow: hidden;
  842. 840.  -   z-index: 10;
  843. 841.  - }
  844. 842.  - .profile_defave_blocked {
  845. 843.  -   padding-top: 10px;
  846. 844.  -   text-align: center;
  847. 845.  -   height: 17px;
  848. 846.  - }
  849. 847.  -
  850. 848.  -
  851. 849.  - /* Domain install done box */
  852. 850.  - .profile_address_done {
  853. 851.  -   text-align: center;
  854. 852.  -   font-size: 12px;
  855. 853.  - }
  856. 854.  - .profile_address_done_header {
  857. 855.  -   font-size: 20px;
  858. 856.  - }
  859. 857.  - .profile_address_done_desc {
  860. 858.  -   margin-top: 1.4em;
  861. 859.  - }
  862. 860.  - .profile_address_done_link {
  863. 861.  -   font-size: 20px;
  864. 862.  - }
  865. 863.  - .profile_suggest_fr {
  866. 864.  -   text-align: center;
  867. 865.  -   padding-top: 10px
  868. 866.  - }
  869. 867.  - .profile_suggest_fr img {
  870. 868.  -   -webkit-border-radius: 5px;
  871. 869.  -   -khtml-border-radius: 5px;
  872. 870.  -   -moz-border-radius: 5px;
  873. 871.  -   border-radius: 5px;
  874. 872.  -   margin: 0px 5px;
  875. 873.  - }
  876. 874.  - .profile_friends_suggested {
  877. 875.  -   font-size: 1.1em;
  878. 876.  - }
  879. 877.  - #profile_fr_add_friends {
  880. 878.  -   padding: 10px 4px;
  881. 879.  -   border-top: 1px solid #DAE1E8;
  882. 880.  - }
  883. 881.  - .profile_fr_sugg_title {
  884. 882.  -   color: #36638E;
  885. 883.  -   font-weight: bold;
  886. 884.  -   padding: 0px 4px 10px 4px;
  887. 885.  - }
  888. 886.  - .profile_fr_cell {
  889. 887.  -   width: 66px;
  890. 888.  -   overflow: hidden;
  891. 889.  -   text-align: center;
  892. 890.  -   margin: 0px 6px;
  893. 891.  - }
  894. 892.  - .profile_fr_info {
  895. 893.  -   padding-top: 2px;
  896. 894.  - }
  897. 895.  -
  898. 896.  - /* photos add */
  899. 897.  - #profile_photos_upload_wrap {
  900. 898.  -   position: relative;
  901. 899.  -   margin-bottom: 15px;
  902. 900.  - }
  903. 901.  - #profile_photos_upload {
  904. 902.  -   background: #eff1f3;
  905. 903.  -   padding: 17px;
  906. 904.  -   text-align: center;
  907. 905.  -   color: #738392;
  908. 906.  -   line-height: 16px;
  909. 907.  -   display: block;
  910. 908.  - }
  911. 909.  - a#profile_photos_upload:hover,
  912. 910.  - #profile_photos_upload.hover {
  913. 911.  -   background: #e9edf1;
  914. 912.  -   text-decoration: none;
  915. 913.  - }
  916. 914.  - .profile_photos_upload_label {
  917. 915.  -   background: url('/images/camera.gif') left 1px no-repeat;
  918. 916.  -   padding: 4px 0px 4px 35px;
  919. 917.  - }
  920. 918.  - .profile_photo_upload_box {
  921. 919.  -   padding: 30px 20px;
  922. 920.  -   text-align: center;
  923. 921.  -   line-height: 200%;
  924. 922.  - }
  925. 923.  - .profile_progress_wrap {
  926. 924.  -   width: 250px;
  927. 925.  -   height: 18px;
  928. 926.  -   margin: 18px auto 0;
  929. 927.  -   background: #FFF;
  930. 928.  -   border: 1px solid #CCC;
  931. 929.  - }
  932. 930.  - .profile_progress {
  933. 931.  -   height: 18px;
  934. 932.  -   background: #597DA3 url(/images/progress_grad.gif) repeat;
  935. 933.  -   border: 1px solid #45688E;
  936. 934.  -   margin: -1px;
  937. 935.  - }
  938. 936.  - #profile_photos_extra_link.hover {
  939. 937.  -   text-decoration: underline;
  940. 938.  - }
  941. 939.  - .profile_gifts_send {
  942. 940.  -   max-width: 170px;
  943. 941.  -   overflow: hidden;
  944. 942.  -   -o-text-overflow: ellipsis;
  945. 943.  -   text-overflow: ellipsis;
  946. 944.  -   white-space: nowrap;
  947. 945.  - }
  948. 946.  - b.profile_mob_onl {
  949. 947.  -   background-position: -11px 0px;
  950. 948.  -   *background-position: -11px -1px;
  951. 949.  - }
  952. 950.  - .profile_photo_prev {
  953. 951.  -   line-height: 160%;
  954. 952.  - }
  955. 953.  - #profile_map {
  956. 954.  -   position: relative;
  957. 955.  - }
  958. 956.  - .profile_map_photo {
  959. 957.  -   width: 35px;
  960. 958.  -   height: 35px;
  961. 959.  -   margin-left: -20px;
  962. 960.  -   margin-top: -20px;
  963. 961.  -   cursor: pointer;
  964. 962.  -   position: absolute;
  965. 963.  -   -webkit-border-radius: 20px;
  966. 964.  -   -moz-border-radius: 20px;
  967. 965.  -   border-radius: 20px;
  968. 966.  -   border: 2px solid #FFFFFF;
  969. 967.  -   -webkit-box-shadow: 0px 1px 3px #CED2D8;
  970. 968.  -   -moz-box-shadow: 0px 1px 3px #ced2d8;
  971. 969.  -   box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
  972. 970.  - }
  973. 971.  - .profile_map_img {
  974. 972.  -   width: 40px;
  975. 973.  -   -webkit-border-radius: 4px;
  976. 974.  -   -moz-border-radius: 4px;
  977. 975.  -   border-radius: 4px;
  978. 976.  - }
  979. 977.  - #profile_map_photo_loader {
  980. 978.  -   position: absolute;
  981. 979.  -   display: block;
  982. 980.  -   width: 35px;
  983. 981.  -   height: 35px;
  984. 982.  -   background: rgba(0, 0, 0, 0.4) url('/images/upload_gray_mini.gif') no-repeat center center;
  985. 983.  -   -webkit-border-radius: 20px;
  986. 984.  -   -moz-border-radius: 20px;
  987. 985.  -   border-radius: 20px;
  988. 986.  - }
  989. 987.  - .profile_map_first {
  990. 988.  -   text-align: center;
  991. 989.  - }
  992. 990.  - .profile_map_photo_count {
  993. 991.  -   display: inline-block;
  994. 992.  -   *display: block;
  995. 993.  -   *zoom: 1;
  996. 994.  -   background: #000000;
  997. 995.  -   background: rgba(0, 0, 0, 0.6);
  998. 996.  -   color: #FFFFFF;
  999. 997.  -   font-weight: bold;
  1000. 998.  -   margin-top: 7px;
  1001. 999.  -   padding: 2px 6px;
  1002. 1000.  -   -webkit-border-radius: 4px;
  1003. 1001.  -   -moz-border-radius: 4px;
  1004. 1002.  -   border-radius: 4px;
  1005. 1003.  -
  1006. 1004.  - }
  1007. 1005.  - #profile_place_add {
  1008. 1006.  -   position: absolute;
  1009. 1007.  -   width: 370px;
  1010. 1008.  -   text-align: center;
  1011. 1009.  -   z-index: 500;
  1012. 1010.  -   padding: 87px 10px;
  1013. 1011.  -   cursor: pointer;
  1014. 1012.  - }
  1015. 1013.  - .profile_place_add_bg {
  1016. 1014.  -   background: rgba(0,0,0,0.5);
  1017. 1015.  -   font-size: 1.2em;
  1018. 1016.  -   color: #FFFFFF;
  1019. 1017.  -   font-weight: bold;
  1020. 1018.  -   display: inline-block;
  1021. 1019.  -   padding: 6px;
  1022. 1020.  -   -webkit-border-radius: 3px;
  1023. 1021.  -   -moz-border-radius: 3px;
  1024. 1022.  -   border-radius: 3px;
  1025. 1023.  -   opacity: 0.8;
  1026. 1024.  -   filter: alpha(opacity=80);
  1027. 1025.  - }
  1028. 1026.  - .profile_view_as_warn {
  1029. 1027.  -   line-height: 160%;
  1030. 1028.  - }
  1031. 1029.  - .profile_calls_btn {
  1032. 1030.  -   background: url('/images/icons/videocall_s.png') no-repeat 0px 0px;
  1033. 1031.  -   width: 18px;
  1034. 1032.  -   height: 12px;
  1035. 1033.  -   margin-left: 5px;
  1036. 1034.  - }
  1037. 1035.  - #profile_map_cont {
  1038. 1036.  -   cursor: pointer;
  1039. 1037.  - }
  1040. ------
  1041. Файл - emoji.js (Старый размер - 30757 | Новый - 0):
  1042. 0.  - if (!window.Emoji) {
  1043. 1.  - var Emoji = {
  1044. 2.  -
  1045. 3.  - opts: {},
  1046. 4.  - last: 0,
  1047. 5.  - shownId: false,
  1048. 6.  -
  1049. 7.  - init: function(txt, opts) {
  1050. 8.  -   var optId = Emoji.last;
  1051. 9.  -   opts.txt = txt;
  1052. 10.  -   if (opts.forceTxt) {
  1053. 11.  -     opts.editable = 0;
  1054. 12.  -     placeholderSetup(txt);
  1055. 13.  -   } else {
  1056. 14.  -     opts.editable = 1;
  1057. 15.  -     setTimeout(function() {
  1058. 16.  -       placeholderSetup(txt, {editable: 1, editableFocus: Emoji.editableFocus});
  1059. 17.  -       if (opts.shouldFocus) {
  1060. 18.  -         Emoji.editableFocus(txt, false, true);
  1061. 19.  -       }
  1062. 20.  -     }, 0);
  1063. 21.  -     if (browser.mozilla) {
  1064. 22.  -       document.execCommand("enableObjectResizing", false, false);
  1065. 23.  -       cur.destroy.push(function() {
  1066. 24.  -         document.execCommand("enableObjectResizing", false, true);
  1067. 25.  -       })
  1068. 26.  -     }
  1069. 27.  -     addEvent(txt, browser.opera ? 'click' : 'mousedown', function(e) {
  1070. 28.  -       if (e.target && e.target.tagName == 'IMG') {
  1071. 29.  -         if (Emoji.getCode(e.target)) {
  1072. 30.  -           Emoji.editableFocus(txt, e.target, e.offsetX > 8);
  1073. 31.  -           return cancelEvent(e);
  1074. 32.  -         }
  1075. 33.  -       }
  1076. 34.  -       opts.emojiFocused = false;
  1077. 35.  -     });
  1078. 36.  -
  1079. 37.  -     addEvent(txt, 'keypress keydown keyup paste', function(e) {
  1080. 38.  -       if (e.type == 'keydown') {
  1081. 39.  -         if (e.keyCode == KEY.RETURN || e.keyCode == 10) {
  1082. 40.  -           if (cur.ctrl_submit && (e.ctrlKey || browser.mac && e.metaKey) ||
  1083. 41.  -               !cur.ctrl_submit && !e.shiftKey && !(e.ctrlKey || browser.mac && e.metaKey)) {
  1084. 42.  -             if (!Emoji.emojiEnter(optId, e)) {
  1085. 43.  -               return false;
  1086. 44.  -             }
  1087. 45.  -             if (!opts.noEnterSend) {
  1088. 46.  -               opts.onSend();
  1089. 47.  -               return cancelEvent(e);
  1090. 48.  -             }
  1091. 49.  -           }
  1092. 50.  -         }
  1093. 51.  -         if (e.ctrlKey && e.keyCode == KEY.RETURN) {
  1094. 52.  -           var val = this.value;
  1095. 53.  -           if (cur.editable) {
  1096. 54.  -             if (browser.msie) {
  1097. 55.  -               var r = document.selection.createRange();
  1098. 56.  -               if (r.pasteHTML) {
  1099. 57.  -                 r.pasteHTML('<div><br/></div>');
  1100. 58.  -               }
  1101. 59.  -             } else {
  1102. 60.  -               document.execCommand('insertHTML', false, '<div><br/></div>');
  1103. 61.  -             }
  1104. 62.  -           } else {
  1105. 63.  -             if (typeof this.selectionStart == "number" && typeof this.selectionEnd == "number") {
  1106. 64.  -               var start = this.selectionStart;
  1107. 65.  -               this.value = val.slice(0, start) + "\n" + val.slice(this.selectionEnd);
  1108. 66.  -               this.selectionStart = this.selectionEnd = start + 1;
  1109. 67.  -             } else if (document.selection && document.selection.createRange) {
  1110. 68.  -               this.focus();
  1111. 69.  -               var range = document.selection.createRange();
  1112. 70.  -               range.text = "\r\n";
  1113. 71.  -               range.collapse(false);
  1114. 72.  -               if (browser.opera) {
  1115. 73.  -                 range.moveEnd('character', 0);
  1116. 74.  -                 range.moveStart('character', 0);
  1117. 75.  -               }
  1118. 76.  -               range.select();
  1119. 77.  -             }
  1120. 78.  -             txt.autosize.update();
  1121. 79.  -             setTimeout(function () {
  1122. 80.  -               txt.autosize.update();
  1123. 81.  -             }, 0);
  1124. 82.  -           }
  1125. 83.  -           return false;
  1126. 84.  -         }
  1127. 85.  -         if (e.keyCode == KEY.TAB && !(e.ctrlKey || browser.mac && e.metaKey)) {
  1128. 86.  -           if (Emoji.shown) {
  1129. 87.  -             Emoji.editableFocus(txt, false, true);
  1130. 88.  -             Emoji.ttClick(optId, geByClass1('emoji_smile', opts.controlsCont), true);
  1131. 89.  -           } else {
  1132. 90.  -             Emoji.ttClick(optId, geByClass1('emoji_smile', opts.controlsCont), false, true);
  1133. 91.  -           }
  1134. 92.  -           return cancelEvent(e);
  1135. 93.  -         }
  1136. 94.  -         if (e.keyCode == KEY.ESC) {
  1137. 95.  -           if (Emoji.shown) {
  1138. 96.  -             Emoji.editableFocus(txt, false, true);
  1139. 97.  -             Emoji.ttClick(optId, geByClass1('emoji_smile', opts.controlsCont), true);
  1140. 98.  -           }
  1141. 99.  -           return cancelEvent(e);
  1142. 100.  -         }
  1143. 101.  -       }
  1144. 102.  -
  1145. 103.  -       if (e.type == 'paste') {
  1146. 104.  -         Emoji.onEditablePaste(txt, opts, optId);
  1147. 105.  -       } else if (cur.editable && e.type == 'keyup') {
  1148. 106.  -         if (opts.checkEditable) {
  1149. 107.  -           opts.checkEditable(optId, txt);
  1150. 108.  -         }
  1151. 109.  -       }
  1152. 110.  -       if (opts.onKeyAction) {
  1153. 111.  -         opts.onKeyAction(e);
  1154. 112.  -       }
  1155. 113.  -       return true;
  1156. 114.  -     });
  1157. 115.  -   }
  1158. 116.  -
  1159. 117.  -
  1160. 118.  -   Emoji.opts[Emoji.last] = opts;
  1161. 119.  -   return Emoji.last++;
  1162. 120.  - },
  1163. 121.  -
  1164. 122.  - onEditablePaste: function(txt, opts, optId) {
  1165. 123.  -   setTimeout(function(){
  1166. 124.  -     Emoji.cleanCont(txt);
  1167. 125.  -     setTimeout(function() {
  1168. 126.  -       if (opts.checkEditable) {
  1169. 127.  -         opts.checkEditable(optId, txt);
  1170. 128.  -       }
  1171. 129.  -     }, 0)
  1172. 130.  -   }, 0);
  1173. 131.  - },
  1174. 132.  -
  1175. 133.  - cleanCont: function(cont) {
  1176. 134.  -   var el = cont.firstChild;
  1177. 135.  -   while (el) {
  1178. 136.  -     var next = el.nextSibling;
  1179. 137.  -     switch (el.nodeType) {
  1180. 138.  -       case 1:
  1181. 139.  -         if (el.tagName == 'DIV' || el.tagName == 'P') {
  1182. 140.  -           el.setAttribute('style', '');
  1183. 141.  -           el.className = '';
  1184. 142.  -           el.id = '';
  1185. 143.  -           Emoji.cleanCont(el);
  1186. 144.  -         } else if (el.tagName == 'IMG') {
  1187. 145.  -           if (!Emoji.getCode(el)) {
  1188. 146.  -             re(el);
  1189. 147.  -           }
  1190. 148.  -         } else if (el.tagName != 'BR' ){
  1191. 149.  -           var text = Emoji.editableVal(el, {saveEmoji: true});
  1192. 150.  -           var f = cf(clean(text).replace(/\n/g, '<br/>'));
  1193. 151.  -           var last = f.lastChild;
  1194. 152.  -           el.parentNode.replaceChild(f, el);
  1195. 153.  -           if (last) {
  1196. 154.  -             Emoji.editableFocus(cont, last, true);
  1197. 155.  -           }
  1198. 156.  -         }
  1199. 157.  -         break;
  1200. 158.  -     }
  1201. 159.  -     el = next;
  1202. 160.  -   }
  1203. 161.  - },
  1204. 162.  -
  1205. 163.  - editableFocus: function(editable, obj, after) {
  1206. 164.  -   if (!editable) {
  1207. 165.  -     return false;
  1208. 166.  -   }
  1209. 167.  -   editable.focus();
  1210. 168.  -   if (editable.phonfocus) {
  1211. 169.  -     editable.phonfocus();
  1212. 170.  -   }
  1213. 171.  -   if (typeof window.getSelection != 'undefined' && typeof document.createRange != 'undefined') {
  1214. 172.  -     var sel = window.getSelection();
  1215. 173.  -     if (browser.opera && !after) {
  1216. 174.  -       sel.collapse(obj || editable, 0);
  1217. 175.  -     } else {
  1218. 176.  -       var range = document.createRange();
  1219. 177.  -       if (obj) {
  1220. 178.  -         range.selectNode(obj);
  1221. 179.  -       } else {
  1222. 180.  -         range.selectNodeContents(editable);
  1223. 181.  -       }
  1224. 182.  -       range.collapse(after ? false : true);
  1225. 183.  -       var sel = window.getSelection();
  1226. 184.  -       sel.removeAllRanges();
  1227. 185.  -       sel.addRange(range);
  1228. 186.  -     }
  1229. 187.  -   } else if (typeof document.body.createTextRange != 'undefined') {
  1230. 188.  -     var textRange = document.body.createTextRange();
  1231. 189.  -     textRange.moveToElementText(obj || editable);
  1232. 190.  -     textRange.collapse(after ? false : true);
  1233. 191.  -     textRange.select();
  1234. 192.  -   }
  1235. 193.  - },
  1236. 194.  -
  1237. 195.  - editableVal: function(cont, opts) {
  1238. 196.  -   if (!cont) return '';
  1239. 197.  -   if (cont.tagName == 'TEXTAREA') return val(cont);
  1240. 198.  -   var el = cont.firstChild;
  1241. 199.  -   var v = '';
  1242. 200.  -   var contTag = new RegExp('^(DIV|P|LI|OL|TR|TD|BLOCKQUOTE)$');
  1243. 201.  -   while (el) {
  1244. 202.  -     switch (el.nodeType) {
  1245. 203.  -       case 3:
  1246. 204.  -         var str = el.data.replace(/^\n|\n$/g, ' ').replace(/[\n\xa0]/g, ' ').replace(/[ ]+/g, ' ');
  1247. 205.  -         v += str;
  1248. 206.  -         break;
  1249. 207.  -       case 1:
  1250. 208.  -         var str = Emoji.editableVal(el);
  1251. 209.  -         if (el.tagName && el.tagName.match(contTag) && str) {
  1252. 210.  -           if (str.substr(-1) != '\n') {
  1253. 211.  -             str += '\n';
  1254. 212.  -           }
  1255. 213.  -
  1256. 214.  -           var prev = el.previousSibling;
  1257. 215.  -           while(prev && prev.nodeType == 3 && trim(prev.nodeValue) == '') {
  1258. 216.  -             prev = prev.previousSibling;
  1259. 217.  -           }
  1260. 218.  -           if (prev && !(prev.tagName && prev.tagName.match(contTag))) {
  1261. 219.  -             str = '\n' + str;
  1262. 220.  -           }
  1263. 221.  -
  1264. 222.  -         } else if (el.tagName == 'IMG') {
  1265. 223.  -           var code = Emoji.getCode(el);
  1266. 224.  -           if (code) {
  1267. 225.  -             if (opts && opts.saveEmoji) {
  1268. 226.  -               str += Emoji.getEmojiHTML(code);
  1269. 227.  -             } else {
  1270. 228.  -               str += Emoji.codeToChr(code);
  1271. 229.  -             }
  1272. 230.  -           }
  1273. 231.  -         } else if (el.tagName == 'BR') {
  1274. 232.  -           str += '\n';
  1275. 233.  -         }
  1276. 234.  -         v += str;
  1277. 235.  -         break;
  1278. 236.  -     }
  1279. 237.  -     el = el.nextSibling;
  1280. 238.  -   }
  1281. 239.  -   return v;
  1282. 240.  - },
  1283. 241.  -
  1284. 242.  - cssEmoji: {
  1285. 243.  -   'D83DDE0A': [0, ':-)'], 'D83DDE03': [1, ':-D'], 'D83DDE09': [2, ';-)'], 'D83DDE06': [3, 'xD'], 'D83DDE1C': [4, ';-P'], 'D83DDE0B': [5, ':-p'], 'D83DDE0D': [6, '8-)'], 'D83DDE0E': [7, 'B-)'], 'D83DDE12': [8, ':-('], 'D83DDE0F': [9, ':]'], 'D83DDE14': [10, '3('], 'D83DDE22': [11, ':\'('], 'D83DDE2D': [12, ':_('], 'D83DDE29': [13, ':(('], 'D83DDE28': [14, ':o'], 'D83DDE10': [15, ':|'], 'D83DDE0C': [16, '3-)'], 'D83DDE20': [17, '>('], 'D83DDE21': [18, '>(('], 'D83DDE07': [19, 'O:)'], 'D83DDE30': [20, ';o'], 'D83DDE33': [21, '8|'], 'D83DDE32': [22, '8o'], 'D83DDE37': [23, ':X'], 'D83DDE1A': [24, ':-*'], 'D83DDE08': [25, '}:)'], '2764': [26 , '<3'], 'D83DDC4D': [27, ':like:'], 'D83DDC4E': [28, ':dislike:'], '261D': [29, ':up:'], '270C': [30, ':v:'], 'D83DDC4C': [31, ':ok:']
  1286. 244.  - },
  1287. 245.  - imgEmoji: {'D83DDE15': 1, 'D83DDE1F': 1, 'D83DDE2E': 1, 'D83DDE34': 1},
  1288. 246.  -
  1289. 247.  - getEmojiHTML: function(code, symbol, enabled) {
  1290. 248.  -   var editable = (browser.msie && intval(browser.version) > 8) ? ' contenteditable="false"' : '';
  1291. 249.  -   if (Emoji.cssEmoji[code] != undefined) {
  1292. 250.  -     var num = -Emoji.cssEmoji[code][0] * 17;
  1293. 251.  -     return '<img'+editable+' src="/images/blank.gif" emoji="'+code+'" class="emoji_css" style="background-position: 0px '+num+'px;" />';
  1294. 252.  -   } else {
  1295. 253.  -     if (!Emoji.imgEmoji[code] && symbol && !enabled) {
  1296. 254.  -       return symbol;
  1297. 255.  -     } else {
  1298. 256.  -       return '<img class="emoji" src="/images/emoji'+(window.devicePixelRatio >= 2 ? '_2x' : '')+'/'+code+'.png" />';
  1299. 257.  -     }
  1300. 258.  -   }
  1301. 259.  - },
  1302. 260.  -
  1303. 261.  - codeToChr: function(code) {
  1304. 262.  -   var len = code.length / 4;
  1305. 263.  -   var chr = '';
  1306. 264.  -   var i = 0;
  1307. 265.  -   while(len--) {
  1308. 266.  -     chr += String.fromCharCode(parseInt(code.substr(i, 4), 16))
  1309. 267.  -     i += 4;
  1310. 268.  -   }
  1311. 269.  -   return chr;
  1312. 270.  - },
  1313. 271.  -
  1314. 272.  - checkEditable: function(optId, obj, options) {
  1315. 273.  -   var scH = obj.scrollHeight;
  1316. 274.  -   var opts = Emoji.opts[optId];
  1317. 275.  -   if (!opts) {
  1318. 276.  -     return false;
  1319. 277.  -   }
  1320. 278.  -   var bl = opts.tt;
  1321. 279.  -   if (scH > options.height + 10) {
  1322. 280.  -     if (!opts.isSized) {
  1323. 281.  -       setStyle(obj, {height: options.height+'px', overflowY: 'auto'});
  1324. 282.  -       var sm = geByClass1('emoji_smile', opts.controlsCont);
  1325. 283.  -       var ph = ge('im_upload');
  1326. 284.  -       var diff = sbWidth();
  1327. 285.  -       setStyle(sm, vk.rtl ? {left: 1 + diff} : {right: 1 + diff});
  1328. 286.  -       if (ph) {
  1329. 287.  -         setStyle(ph.parentNode, vk.rtl ? {left: 1 + diff} : {right: 1 + diff});
  1330. 288.  -       }
  1331. 289.  -       if (bl) setStyle(bl, vk.rtl ? {left: 31 + diff} : {right: 31 + diff})
  1332. 290.  -       opts.isSized = true;
  1333. 291.  -     }
  1334. 292.  -   } else if (opts.isSized) {
  1335. 293.  -     setStyle(obj, {height: 'auto', overflowY: 'hidden'});
  1336. 294.  -     var sm = geByClass1('emoji_smile', opts.controlsCont);
  1337. 295.  -     var ph = ge('im_upload');
  1338. 296.  -     setStyle(sm, vk.rtl ? {left: 1} : {right: 1});
  1339. 297.  -     if (ph) {
  1340. 298.  -       setStyle(ph.parentNode, vk.rtl ? {left: 1}: {right: 1});
  1341. 299.  -     }
  1342. 300.  -     if (bl) setStyle(bl, vk.rtl ? {left: 31} : {right: 31})
  1343. 301.  -     opts.isSized = false;
  1344. 302.  -   }
  1345. 303.  - },
  1346. 304.  -
  1347. 305.  - emojiEnter: function(optId, e) {
  1348. 306.  -   var opts = Emoji.opts[optId]
  1349. 307.  -   if (opts.emojiFocused && opts.emojiOvered) {
  1350. 308.  -     var img = geByTag1('img', opts.emojiOvered);
  1351. 309.  -     Emoji.addEmoji(optId, Emoji.getCode(img), opts.emojiOvered);
  1352. 310.  -     opts.emojiFocused = true;
  1353. 311.  -     Emoji.ttClick(optId, ge((cur.peer == -3) ? 'imw_smile' : 'im_smile'), true);
  1354. 312.  -     debugLog('canceling');
  1355. 313.  -     return cancelEvent(e);
  1356. 314.  -   }
  1357. 315.  -   return true;
  1358. 316.  - },
  1359. 317.  -
  1360. 318.  - addEmoji: function(optId, code, obj) {
  1361. 319.  -   if (optId === false) {
  1362. 320.  -     return false;
  1363. 321.  -   }
  1364. 322.  -   var opts = Emoji.opts[optId];
  1365. 323.  -   opts.emojiFocused = false;
  1366. 324.  -   if (opts.editable) {
  1367. 325.  -     if (browser.mozilla || browser.msie) {
  1368. 326.  -       var img = ' '+Emoji.getEmojiHTML(code)+'&nbsp;';
  1369. 327.  -     } else {
  1370. 328.  -       var img = ' '+Emoji.getEmojiHTML(code)+'&nbsp;';
  1371. 329.  -     }
  1372. 330.  -     var editable = opts.txt;
  1373. 331.  -     var sel = window.getSelection ? window.getSelection() : false;
  1374. 332.  -     if (sel && sel.rangeCount) {
  1375. 333.  -       r = sel.getRangeAt(0);
  1376. 334.  -       if (r.commonAncestorContainer) {
  1377. 335.  -         var rCont = r.commonAncestorContainer;
  1378. 336.  -       } else {
  1379. 337.  -         var rCont = r.parentElement ? r.parentElement() : r.item(0);
  1380. 338.  -       }
  1381. 339.  -     } else {
  1382. 340.  -       var rCont = false;
  1383. 341.  -     }
  1384. 342.  -     el = rCont;
  1385. 343.  -     while(el && el != editable) {
  1386. 344.  -       el = el.parentNode;
  1387. 345.  -     }
  1388. 346.  -     var edLast = (editable.lastChild || {});
  1389. 347.  -     if (browser.mozilla && edLast.tagName == 'BR' && !edLast.previousSibling) {
  1390. 348.  -       re(editable.lastChild);
  1391. 349.  -     }
  1392. 350.  -     if (!el) {
  1393. 351.  -       Emoji.editableFocus(editable, false, true);
  1394. 352.  -     }
  1395. 353.  -     if (browser.msie) {
  1396. 354.  -       var r = document.selection.createRange();
  1397. 355.  -       if (r.pasteHTML) {
  1398. 356.  -         r.pasteHTML(img);
  1399. 357.  -       }
  1400. 358.  -     } else {
  1401. 359.  -       document.execCommand('insertHTML', false, img);
  1402. 360.  -     }
  1403. 361.  -     var emojies = geByClass('emoji', editable);
  1404. 362.  -     emojies.push.apply(emojies, geByClass('emoji_css', editable));
  1405. 363.  -     for (i in emojies) {
  1406. 364.  -       var prev = emojies[i].previousSibling;
  1407. 365.  -       if (prev && prev.nodeType == 3 && prev.textContent && prev.textContent.charCodeAt(0) == 32) {
  1408. 366.  -         var p = prev.previousSibling;
  1409. 367.  -         if (p && p.nodeType == 3 && p.textContent && p.textContent.charCodeAt(p.textContent.length - 1) == 160) {
  1410. 368.  -           re(prev);
  1411. 369.  -         }
  1412. 370.  -       }
  1413. 371.  -     }
  1414. 372.  -     if (editable.check) editable.check();
  1415. 373.  -   } else {
  1416. 374.  -     var textArea = opts.txt;
  1417. 375.  -     var val = textArea.value;
  1418. 376.  -     if (browser.iphone || browser.ipad) {
  1419. 377.  -       var text = Emoji.codeToChr(code);
  1420. 378.  -     } else {
  1421. 379.  -       var text = Emoji.cssEmoji[code][1]+' ';
  1422. 380.  -     }
  1423. 381.  -     var endIndex, range;
  1424. 382.  -     if (textArea.selectionStart != undefined && textArea.selectionEnd != undefined) {
  1425. 383.  -       endIndex = textArea.selectionEnd;
  1426. 384.  -       textArea.value = val.slice(0, textArea.selectionStart) + text + val.slice(endIndex);
  1427. 385.  -       textArea.selectionStart = textArea.selectionEnd = endIndex + text.length;
  1428. 386.  -     } else if (typeof document.selection != 'undefined' && typeof document.selection.createRange != 'undefined') {
  1429. 387.  -       textArea.focus();
  1430. 388.  -       range = document.selection.createRange();
  1431. 389.  -       range.text = text;
  1432. 390.  -       range.select();
  1433. 391.  -     }
  1434. 392.  -   }
  1435. 393.  -   if (opts.saveDraft) {
  1436. 394.  -     opts.saveDraft();
  1437. 395.  -   }
  1438. 396.  - },
  1439. 397.  -
  1440. 398.  - ttHide: function(optId) {
  1441. 399.  -   Emoji.ttClick(optId, geByClass1('emoji_smile', Emoji.opts[optId].controlsCont), true);
  1442. 400.  - },
  1443. 401.  -
  1444. 402.  - showShadow: function() {
  1445. 403.  -   return !(browser.msie && browser.version < 10);
  1446. 404.  - },
  1447. 405.  -
  1448. 406.  - ttClick: function(optId, obj, needHide, needShow, ev) {
  1449. 407.  -   var opts = Emoji.opts[optId];
  1450. 408.  -   if (!opts) {
  1451. 409.  -     return;
  1452. 410.  -   }
  1453. 411.  -   if ((needHide && !Emoji.shown) || (needShow && Emoji.shown)) {
  1454. 412.  -     return;
  1455. 413.  -   }
  1456. 414.  -   if (!obj) {
  1457. 415.  -     obj = Emoji.shown || ge((cur.peer == -3) ? 'imw_smile' : 'im_smile');
  1458. 416.  -   }
  1459. 417.  -   if (obj.tt && obj.tt.destroy) {
  1460. 418.  -     obj.tt.destroy();
  1461. 419.  -   }
  1462. 420.  -   if (!opts.tt && opts.sharedTT && opts.sharedTT.emojiTT) {
  1463. 421.  -     opts.tt = opts.sharedTT.emojiTT;
  1464. 422.  -     opts.emojiScroll = opts.sharedTT.emojiScroll;
  1465. 423.  -     opts.allEmojiId = opts.sharedTT.emojiAllId;
  1466. 424.  -   }
  1467. 425.  -   var tt = opts.tt;
  1468. 426.  -   if (!tt) {
  1469. 427.  -     var pointerStyle = '';
  1470. 428.  -     if (opts.ttShift) {
  1471. 429.  -       pointerStyle = ' style="left: '+(95+opts.ttShift)+'px"';
  1472. 430.  -     }
  1473. 431.  -     var tt = ce('div', {
  1474. 432.  -       id: 'emoji_block_'+optId,
  1475. 433.  -       className: 'emoji_tt_wrap'+(!Emoji.showShadow() ? ' emoji_no_opacity' : ''),
  1476. 434.  -       innerHTML: '<div class="emoji_pointer"'+pointerStyle+'></div><div class="emoji_expand_shadow"></div><div class="emoji_expand_shadow_top"></div><div class="emoji_list"><div class="emoji_scroll">'+Emoji.ttEmojiList(optId)+'</div></div>'
  1477. 435.  -     });
  1478. 436.  -     opts.tt = tt;
  1479. 437.  -     Emoji.reappendEmoji(optId, tt);
  1480. 438.  -     Emoji.emojiOver(optId, geByClass1('emoji_scroll', tt).firstChild);
  1481. 439.  -
  1482. 440.  -     if (opts.sharedTT) {
  1483. 441.  -       debugLog('set tt');
  1484. 442.  -       opts.sharedTT.emojiTT = tt;
  1485. 443.  -     }
  1486. 444.  -   }
  1487. 445.  -   clearTimeout(opts.ttEmojiHide);
  1488. 446.  -
  1489. 447.  -   if (Emoji.shownId !== false && Emoji.shownId != optId) {
  1490. 448.  -     Emoji.ttClick(Emoji.shownId, geByClass1('emoji_smile', Emoji.opts[Emoji.shownId].controlsCont), true);
  1491. 449.  -   }
  1492. 450.  -   if (Emoji.shown) {
  1493. 451.  -     var toParams = {marginTop: -128, opacity: 0};
  1494. 452.  -     if (Emoji.cssAnimation()) {
  1495. 453.  -       addClass(tt, 'emoji_animation');
  1496. 454.  -       setStyle(tt, toParams);
  1497. 455.  -       opts.ttEmojiHide = setTimeout(function() {
  1498. 456.  -         removeClass(tt, 'emoji_animation');
  1499. 457.  -         hide(tt);
  1500. 458.  -       }, 1000);
  1501. 459.  -     } else {
  1502. 460.  -       setTimeout(function() {
  1503. 461.  -         animate(tt, toParams, 200, function() {
  1504. 462.  -           hide(tt);
  1505. 463.  -         });
  1506. 464.  -       }, 10);
  1507. 465.  -     }
  1508. 466.  -     Emoji.shown = false;
  1509. 467.  -     Emoji.shownId = false;
  1510. 468.  -     opts.emojiFocused = false;
  1511. 469.  -     cur.onMouseClick = false;
  1512. 470.  -     removeEvent(document, 'keydown', Emoji.emojiMove);
  1513. 471.  -     if (cur.peer == -3) {
  1514. 472.  -       Emoji.anim(obj, 0);
  1515. 473.  -     } else {
  1516. 474.  -       addClass(obj, 'emoji_smile_animation');
  1517. 475.  -       clearTimeout(opts.imSmileAnim);
  1518. 476.  -       opts.imSmileAnim = setTimeout(removeClass.pbind(obj, 'emoji_smile_animation'), 1000);
  1519. 477.  -       removeClass(obj, 'emoji_smile_on');
  1520. 478.  -     }
  1521. 479.  -     if (opts.onHide) {
  1522. 480.  -       opts.onHide();
  1523. 481.  -     }
  1524. 482.  -   } else {
  1525. 483.  -     show(tt);
  1526. 484.  -     var toParams = {marginTop: -118, opacity: 1};
  1527. 485.  -     if (Emoji.cssAnimation()) {
  1528. 486.  -       addClass(tt, 'emoji_animation');
  1529. 487.  -       setTimeout(setStyle.pbind(tt, toParams), 100);
  1530. 488.  -     } else {
  1531. 489.  -       setTimeout(function() {
  1532. 490.  -         show(tt);
  1533. 491.  -         animate(tt, toParams, 200);
  1534. 492.  -       }, 10);
  1535. 493.  -     }
  1536. 494.  -     Emoji.shownId = optId;
  1537. 495.  -     Emoji.shown = obj;
  1538. 496.  -     cur.emojiList = geByClass1('emoji_list', tt);
  1539. 497.  -     opts.emojiFocused = true;
  1540. 498.  -     setTimeout(function() {
  1541. 499.  -       cur.onMouseClick = function(e) {
  1542. 500.  -         var el = e.target;
  1543. 501.  -         while(el) {
  1544. 502.  -           if (el.id == 'im_texts' || hasClass(el, 'emoji_tt_wrap') || hasClass(el, 'imw_emoji_wrap')) {
  1545. 503.  -             return false;
  1546. 504.  -           }
  1547. 505.  -           el = el.parentNode;
  1548. 506.  -         }
  1549. 507.  -         Emoji.ttClick(optId, false, true);
  1550. 508.  -       }
  1551. 509.  -       addEvent(document, 'keydown', Emoji.emojiMove);
  1552. 510.  -     }, 0);
  1553. 511.  -     if (cur.peer == -3) {
  1554. 512.  -       Emoji.anim(obj, 1);
  1555. 513.  -     } else {
  1556. 514.  -       addClass(obj, 'emoji_smile_animation')
  1557. 515.  -       clearTimeout(opts.imSmileAnim);
  1558. 516.  -       opts.imSmileAnim = setTimeout(removeClass.pbind(obj, 'emoji_smile_animation'), 1000);
  1559. 517.  -       addClass(obj, 'emoji_smile_on');
  1560. 518.  -     }
  1561. 519.  -     if (opts.emojiScroll && opts.emojiExpanded) {
  1562. 520.  -       opts.emojiScroll.update(false, true);
  1563. 521.  -     }
  1564. 522.  -     if (opts.onShow) {
  1565. 523.  -       opts.onShow();
  1566. 524.  -     }
  1567. 525.  -   }
  1568. 526.  -   if (!opts.emojiExpanded) {
  1569. 527.  -     Emoji.emojiExpand(optId, tt);
  1570. 528.  -   }
  1571. 529.  -   return cancelEvent(ev);
  1572. 530.  - },
  1573. 531.  - curEmojiSet: ['D83DDE0A', 'D83DDE03', 'D83DDE09', 'D83DDE06', 'D83DDE1C', 'D83DDE0B', 'D83DDE0D', 'D83DDE0E', 'D83DDE12', 'D83DDE0F', 'D83DDE14', 'D83DDE22', 'D83DDE2D', 'D83DDE29', 'D83DDE28', 'D83DDE10', 'D83DDE0C', 'D83DDE04', 'D83DDE07', 'D83DDE30', 'D83DDE32', 'D83DDE33', 'D83DDE37', 'D83DDE02', '2764', 'D83DDE1A', 'D83DDE15', 'D83DDE2F', 'D83DDE26', 'D83DDE35', 'D83DDE20',  'D83DDE21', 'D83DDE1D', 'D83DDE34', 'D83DDE18', 'D83DDE1F', 'D83DDE2C', 'D83DDE36', 'D83DDE2A', 'D83DDE2B', '263A', 'D83DDE00', 'D83DDE25', 'D83DDE1B', 'D83DDE16', 'D83DDE24', 'D83DDE23', 'D83DDE27', 'D83DDE11', 'D83DDE05', 'D83DDE2E', 'D83DDE1E', 'D83DDE19', 'D83DDE13', 'D83DDE01', 'D83DDE31', 'D83DDE08', 'D83DDC7F', 'D83DDC7D', 'D83DDC4D', 'D83DDC4E', '261D', '270C', 'D83DDC4C', 'D83DDC4F', 'D83DDC4A', '270B', 'D83DDE4F', 'D83DDC43', 'D83DDC46', 'D83DDC47', 'D83DDC48', 'D83DDCAA', 'D83DDC42', 'D83DDC8B', 'D83DDCA9', '2744', 'D83CDF4A', 'D83CDF77', 'D83CDF78', 'D83CDF85', 'D83DDCA6', 'D83DDC7A', 'D83DDC28', 'D83DDD1E', 'D83DDC79', '26BD', '26C5', 'D83CDF1F', 'D83CDF4C', 'D83CDF7A', 'D83CDF7B', 'D83CDF39', 'D83CDF45', 'D83CDF52', 'D83CDF81', 'D83CDF82', 'D83CDF84', 'D83CDFC1', 'D83CDFC6', 'D83DDC0E', 'D83DDC0F', 'D83DDC1C', 'D83DDC2B', 'D83DDC2E', 'D83DDC03', 'D83DDC3B', 'D83DDC3C', 'D83DDC05', 'D83DDC13', 'D83DDC18', 'D83DDC94', 'D83DDCAD', 'D83DDC36', 'D83DDC31', 'D83DDC37', 'D83DDC11', '23F3', '26BE', '26C4', '2600', 'D83CDF3A', 'D83CDF3B', 'D83CDF3C', 'D83CDF3D', 'D83CDF4B', 'D83CDF4D', 'D83CDF4E', 'D83CDF4F', 'D83CDF6D', 'D83CDF37', 'D83CDF38', 'D83CDF46', 'D83CDF49', 'D83CDF50', 'D83CDF51', 'D83CDF53', 'D83CDF54', 'D83CDF55', 'D83CDF56', 'D83CDF57', 'D83CDF69', 'D83CDF83', 'D83CDFAA', 'D83CDFB1', 'D83CDFB2', 'D83CDFB7', 'D83CDFB8', 'D83CDFBE', 'D83CDFC0', 'D83CDFE6', 'D83DDE38'],
  1574. 532.  - curEmojiKeys: {},
  1575. 533.  - emojiShowMore: function(optId) {
  1576. 534.  -   debugLog('show emoji more');
  1577. 535.  -   var opts = Emoji.opts[optId];
  1578. 536.  -   if (Emoji.allEmojiCodes) {
  1579. 537.  -     debugLog('show emoji more all', opts.allEmojiId);
  1580. 538.  -     var code;
  1581. 539.  -     var shown = 0;
  1582. 540.  -     var cont = geByClass1('emoji_scroll', opts.tt);
  1583. 541.  -     var str = '';
  1584. 542.  -     re('im_emoji_progress');
  1585. 543.  -     while(code = Emoji.allEmojiCodes[opts.allEmojiId]) {
  1586. 544.  -       opts.allEmojiId += 1;
  1587. 545.  -       if (opts.sharedTT) {
  1588. 546.  -         opts.sharedTT.emojiAllId = opts.allEmojiId;
  1589. 547.  -       }
  1590. 548.  -       if (Emoji.curEmojiKeys[code]) {
  1591. 549.  -         continue;
  1592. 550.  -       }
  1593. 551.  -       str += Emoji.emojiWrapItem(optId, code);
  1594. 552.  -       shown += 1;
  1595. 553.  -       if (shown > 128) {
  1596. 554.  -         break;
  1597. 555.  -       }
  1598. 556.  -     }
  1599. 557.  -     if (str) {
  1600. 558.  -       cont.appendChild(cf(str));
  1601. 559.  -       opts.emojiScroll.update(false, true)
  1602. 560.  -     }
  1603. 561.  -   } else {
  1604. 562.  -     cur.onEmojiLoad = Emoji.emojiShowMore.pbind(optId);
  1605. 563.  -   }
  1606. 564.  - },
  1607. 565.  -
  1608. 566.  - emojiLoadMore: function(optId) {
  1609. 567.  -   var opts = Emoji.opts[optId];
  1610. 568.  -   debugLog('load more');
  1611. 569.  -   opts.emojiMoreSt = 1;
  1612. 570.  -   if (Emoji.allEmojiCodes) {
  1613. 571.  -     opts.allEmojiId = 0;
  1614. 572.  -     if (opts.sharedTT) {
  1615. 573.  -       opts.sharedTT.emojiAllId = 0;
  1616. 574.  -     }
  1617. 575.  -     if (cur.onEmojiLoad) {
  1618. 576.  -       cur.onEmojiLoad();
  1619. 577.  -     }
  1620. 578.  -   } else {
  1621. 579.  -     ajax.post('im', {act: 'get_emoji_list'}, {
  1622. 580.  -       onDone: function(codes) {
  1623. 581.  -         opts.allEmojiId = 0;
  1624. 582.  -         if (opts.sharedTT) {
  1625. 583.  -           opts.sharedTT.emojiAllId = 0;
  1626. 584.  -         }
  1627. 585.  -         Emoji.allEmojiCodes = codes;
  1628. 586.  -         if (cur.onEmojiLoad) {
  1629. 587.  -           cur.onEmojiLoad();
  1630. 588.  -         }
  1631. 589.  -       }
  1632. 590.  -     })
  1633. 591.  -   }
  1634. 592.  - },
  1635. 593.  -
  1636. 594.  - ttEmojiList: function(optId) {
  1637. 595.  -   var list = [];
  1638. 596.  -   var ems = Emoji.curEmojiSet;
  1639. 597.  -   var recent = [];
  1640. 598.  -   var recentList = {};
  1641. 599.  -
  1642. 600.  -   for (var i in ems) {
  1643. 601.  -     var code = ems[i];
  1644. 602.  -     Emoji.curEmojiKeys[code] = 1;
  1645. 603.  -     var str = Emoji.emojiWrapItem(optId, code, i);
  1646. 604.  -     list.push(str);
  1647. 605.  -   }
  1648. 606.  -   if (recent.length) {
  1649. 607.  -     list.unshift.apply(list, recent);
  1650. 608.  -   }
  1651. 609.  -   var loadingEl = '<div align="center" id="im_emoji_progress"><span class="progress_inline progress_gray"></span></div>';
  1652. 610.  -
  1653. 611.  -   return list.join('')+loadingEl;
  1654. 612.  - },
  1655. 613.  -
  1656. 614.  - emojiWrapItem: function(optId, code, i) {
  1657. 615.  -   var info = Emoji.cssEmoji[code];
  1658. 616.  -   if (info) {
  1659. 617.  -     var titleStr = ' title="'+info[1]+'"';
  1660. 618.  -   } else {
  1661. 619.  -     var titleStr = '';
  1662. 620.  -   }
  1663. 621.  -   if (browser.mobile) {
  1664. 622.  -     var overEvent = '';
  1665. 623.  -   } else {
  1666. 624.  -     var overEvent = ' onmouseover="return Emoji.emojiOver('+optId+', this);"';
  1667. 625.  -   }
  1668. 626.  -   return '<a class="emoji_smile_cont '+((code != '2764' && i && (i < 54)) ? 'emoji_smile_shadow' : '')+'" '+titleStr+' onmousedown="Emoji.addEmoji(Emoji.shownId, \''+code+'\', this); return cancelEvent(event);" onclick="return cancelEvent(event);"'+overEvent+'><div class="emoji_bg"></div><div class="emoji_shadow"></div>'+Emoji.getEmojiHTML(code)+'</a>'
  1669. 627.  - },
  1670. 628.  -
  1671. 629.  - reappendEmoji: function(optId, tt) {
  1672. 630.  -   var opts = Emoji.opts[optId];
  1673. 631.  -   if (opts.rceCont) {
  1674. 632.  -     if (!opts.addMediaBtn) {
  1675. 633.  -       opts.sendWrap.appendChild(opts.rceCont);
  1676. 634.  -     } else {
  1677. 635.  -       opts.sendWrap.insertBefore(opts.rceCont, opts.addMediaBtn);
  1678. 636.  -     }
  1679. 637.  -   }
  1680. 638.  -   if (!tt) return;
  1681. 639.  -   if (cur.peer == -3) {
  1682. 640.  -     var smile = ge('imw_smile'), txt =  ge(opts.editable ? 'imw_editable' : 'imw_text'), diff = (txt.scrollHeight > txt.offsetHeight) ? sbWidth() : 0
  1683. 641.  -     domPN(smile).insertBefore(tt, smile);
  1684. 642.  -     setStyle(tt, vk.rtl ? {marginRight: 306 - diff} : {marginLeft: 306 - diff});
  1685. 643.  -   } else {
  1686. 644.  -     var controls = opts.controlsCont;
  1687. 645.  -     var diff = opts.isSized ? sbWidth() : 0;
  1688. 646.  -
  1689. 647.  -     controls.insertBefore(tt, domFC(controls));
  1690. 648.  -     diff += opts.ttDiff;
  1691. 649.  -     if (opts.ttShift) {
  1692. 650.  -       diff += opts.ttShift;
  1693. 651.  -     }
  1694. 652.  -     setStyle(tt, vk.rtl ? {left: diff} : {right: diff});
  1695. 653.  -   }
  1696. 654.  -   clearTimeout(cur.ttEmojiHide);
  1697. 655.  -   hide(tt);
  1698. 656.  - },
  1699. 657.  - emojiOver: function(optId, obj) {
  1700. 658.  -   if (browser.mobile) {
  1701. 659.  -     return true;
  1702. 660.  -   }
  1703. 661.  -   var opts = Emoji.opts[optId]
  1704. 662.  -   addClass(obj, 'emoji_over');
  1705. 663.  -   if (opts.emojiOvered && opts.emojiOvered != obj) {
  1706. 664.  -     removeClass(opts.emojiOvered, 'emoji_over');
  1707. 665.  -   }
  1708. 666.  -   opts.emojiOvered = obj;
  1709. 667.  -   Emoji.emojiOpera(optId);
  1710. 668.  - },
  1711. 669.  - emojiOpera: function(optId) { // fuck opera!
  1712. 670.  -   if (browser.opera && !browser.mobile) {
  1713. 671.  -     var tt = Emoji.opts[optId].tt;
  1714. 672.  -     animate(tt, {opacity: 0.99}, 20, animate.pbind(tt, {opacity: 1}, 20));
  1715. 673.  -   }
  1716. 674.  - },
  1717. 675.  - emojiExpand: function(optId, block) {
  1718. 676.  -   var opts = Emoji.opts[optId];
  1719. 677.  -   var list = geByClass1('emoji_list', block);
  1720. 678.  -   if (Emoji.cssAnimation()) {
  1721. 679.  -     removeClass(block, 'emoji_animation')
  1722. 680.  -   }
  1723. 681.  -   addClass(block, 'emoji_expanded');
  1724. 682.  -
  1725. 683.  -   if (opts.emojiScroll) {
  1726. 684.  -     opts.emojiScroll.enable()
  1727. 685.  -   } else {
  1728. 686.  -     var topShown = false;
  1729. 687.  -     var bottomShown = false;
  1730. 688.  -     opts.emojiScroll = new Scrollbar(list, {
  1731. 689.  -       prefix: 'emoji_',
  1732. 690.  -       nomargin: true,
  1733. 691.  -       global: true,
  1734. 692.  -       nokeys: true,
  1735. 693.  -       right: vk.rtl ? 'auto' : 10,
  1736. 694.  -       left: !vk.rtl ? 'auto' : 10,
  1737. 695.  -       scrollChange: function(top) {
  1738. 696.  -         if (window.tooltips) {
  1739. 697.  -           tooltips.destroyAll();
  1740. 698.  -           cur.ttScrollTime = new Date().getTime();
  1741. 699.  -         }
  1742. 700.  -         if (Emoji.showShadow()) {
  1743. 701.  -           if (top && !topShown) {
  1744. 702.  -             show(geByClass1('emoji_expand_shadow_top', opts.tt));
  1745. 703.  -             topShown = true;
  1746. 704.  -           } else if (!top && topShown) {
  1747. 705.  -             topShown = false;
  1748. 706.  -             hide(geByClass1('emoji_expand_shadow_top', opts.tt));
  1749. 707.  -           }
  1750. 708.  -         }
  1751. 709.  -         if (top > 10 && !opts.emojiMoreSt) {
  1752. 710.  -           Emoji.emojiLoadMore(optId);
  1753. 711.  -         }
  1754. 712.  -         Emoji.emojiOpera(optId);
  1755. 713.  -       },
  1756. 714.  -       more: Emoji.emojiShowMore.pbind(optId)
  1757. 715.  -     });
  1758. 716.  -
  1759. 717.  -     if (opts.sharedTT) {
  1760. 718.  -       opts.sharedTT.emojiScroll = opts.emojiScroll;
  1761. 719.  -     }
  1762. 720.  -   }
  1763. 721.  -   opts.emojiExpanded = true;
  1764. 722.  - },
  1765. 723.  -
  1766. 724.  - emojiMove: function(e) {
  1767. 725.  -   var optId = Emoji.shownId;
  1768. 726.  -   var opts = Emoji.opts[optId];
  1769. 727.  -   if (Emoji.shown && opts.emojiFocused) {
  1770. 728.  -     var el = opts.emojiOvered;
  1771. 729.  -     switch (e.keyCode) {
  1772. 730.  -       case KEY.LEFT:
  1773. 731.  -         el = el.previousSibling;
  1774. 732.  -         break;
  1775. 733.  -       case KEY.RIGHT:
  1776. 734.  -         el = el.nextSibling;
  1777. 735.  -         break;
  1778. 736.  -       case KEY.UP:
  1779. 737.  -         var i = 9;
  1780. 738.  -         while (el.previousSibling && --i > 0) {
  1781. 739.  -           el = el.previousSibling;
  1782. 740.  -         }
  1783. 741.  -         if (i > 1) {
  1784. 742.  -           return cancelEvent(e);
  1785. 743.  -         }
  1786. 744.  -         break;
  1787. 745.  -       case KEY.DOWN:
  1788. 746.  -         var i = 9;
  1789. 747.  -         while (el.nextSibling && --i > 0) {
  1790. 748.  -           el = el.nextSibling;
  1791. 749.  -         }
  1792. 750.  -         if (i > 1) {
  1793. 751.  -           return cancelEvent(e);
  1794. 752.  -         }
  1795. 753.  -         break;
  1796. 754.  -       case KEY.ENTER:
  1797. 755.  -         return Emoji.emojiEnter(optId, e);
  1798. 756.  -         break;
  1799. 757.  -       default:
  1800. 758.  -         return true;
  1801. 759.  -     }
  1802. 760.  -     if (el) {
  1803. 761.  -       var diff = el.offsetTop - cur.emojiList.scrollTop;
  1804. 762.  -       if (diff > 72) {
  1805. 763.  -         animate(cur.emojiList, {scrollTop: cur.emojiList.scrollTop + (diff - 72)}, 80, function() {
  1806. 764.  -           opts.emojiScroll.update(true, true)
  1807. 765.  -         });
  1808. 766.  -       } else if (diff < 0) {
  1809. 767.  -         animate(cur.emojiList, {scrollTop: cur.emojiList.scrollTop + diff}, 80, function() {
  1810. 768.  -           opts.emojiScroll.update(true, true)
  1811. 769.  -         });
  1812. 770.  -       }
  1813. 771.  -       Emoji.emojiOver(optId, el);
  1814. 772.  -     }
  1815. 773.  -     return cancelEvent(e);
  1816. 774.  -   }
  1817. 775.  -   return true;
  1818. 776.  - },
  1819. 777.  -
  1820. 778.  - anim: function(el, to) {
  1821. 779.  -   clearInterval(cur._imAnim);
  1822. 780.  -   var dt = 300, dStep = 45 / (dt / 13), oStep = 1 / (dt / 13), steps = Math.floor(dt / 13), i = 0;
  1823. 781.  -   var el1 = domLC(el), el2 = domFC(el);
  1824. 782.  -   var dFrom1 = to ? 0 : 45, dTo1 = to ? 45 : 0, oFrom1 = to ? 1 : 0, oTo1 = to ? 0 : 1;
  1825. 783.  -   cur._imAnim = setInterval(function() {
  1826. 784.  -     ++i;
  1827. 785.  -     var d1 = (i >= steps) ? dTo1 : (dFrom1 + dStep * i * (to ? 1 : -1)), d2 = d1 - 45;
  1828. 786.  -     var o1 = (i >= steps) ? oTo1 : (oFrom1 + oStep * i * (to ? -1 : 1)), o2 = 1 - o1;
  1829. 787.  -     el1.style.WebkitTransform = el1.style.OTransform = el1.style.transform = 'rotate(' + d1 + 'deg)';
  1830. 788.  -     el2.style.WebkitTransform = el2.style.OTransform = el2.style.transform = 'rotate(' + d2 + 'deg)';
  1831. 789.  -     el1.style.opacity = o1;
  1832. 790.  -     el2.style.opacity = o2;
  1833. 791.  -     if (i >= steps) {
  1834. 792.  -       clearInterval(cur._imAnim);
  1835. 793.  -       (to ? addClass : removeClass)(el, 'emoji_smile_on');
  1836. 794.  -       el1.style.WebkitTransform = el1.style.OTransform = el1.style.transform = el2.style.WebkitTransform = el2.style.OTransform = el2.style.transform = el1.style.opacity = el2.style.opacity = '';
  1837. 795.  -     }
  1838. 796.  -   }, 13);
  1839. 797.  - },
  1840. 798.  - cssAnimation: function() {
  1841. 799.  -   var v = intval(browser.version);
  1842. 800.  -   if ((browser.chrome && v > 14) || (browser.mozilla && v > 13) || (browser.opera && v > 2)) {
  1843. 801.  -     return (cur.peer != -3);
  1844. 802.  -   }
  1845. 803.  -   return false;
  1846. 804.  - },
  1847. 805.  - ttOver: function(obj) {
  1848. 806.  -   animate(obj, {opacity: 1}, 200);
  1849. 807.  - },
  1850. 808.  - ttOut: function(obj) {
  1851. 809.  -   animate(obj, {opacity: 0.7}, 200);
  1852. 810.  - },
  1853. 811.  - tplSmile: function(optId, placeholder, classAddr) {
  1854. 812.  -   return '<div title="'+placeholder+'" class="fl_l emoji_smile'+classAddr+'" onmouseover="Emoji.ttOver(this);" onmouseout="Emoji.ttOut(this);" onmousedown="return Emoji.ttClick('+optId+', this, false, false, event);" onclick="return cancelEvent(event);" style="right: 1px; opacity: 0.7;"><div class="emoji_smile_icon_on"></div><div class="emoji_smile_icon"></div></div>'
  1855. 813.  - },
  1856. 814.  -
  1857. 815.  -
  1858. 816.  - emojiToHTML: function(str, replaceSymbols) {
  1859. 817.  -   if (browser.ipad || browser.iphone) {
  1860. 818.  -     return str;
  1861. 819.  -   }
  1862. 820.  -   str = str.replace(/&nbsp;/g, ' ').replace(/<br>/g, "\n");
  1863. 821.  -   var regs = {
  1864. 822.  -     'D83DDE07': /(\s|^)([0O�]:\))([\s\.,]|$)/g,
  1865. 823.  -     'D83DDE09': /(\s|^)(;-\)+)([\s\.,]|$)/g,
  1866. 824.  -     'D83DDE06': /(\s|^)([X�x�]-?D)([\s\.,]|$)/g,
  1867. 825.  -     'D83DDE0E': /(\s|^)(B-\))([\s\.,]|$)/g,
  1868. 826.  -     'D83DDE0C': /(\s|^)(3-\))([\s\.,]|$)/g,
  1869. 827.  -     'D83DDE20': /(\s|^)(&gt;\()([\s\.,]|$)/g,
  1870. 828.  -     'D83DDE30': /(\s|^)(;[o�O�])([\s\.,]|$)/g,
  1871. 829.  -     'D83DDE33': /(\s|^)(8\|)([\s\.,]|$)/g,
  1872. 830.  -     'D83DDE32': /(\s|^)(8-?[o�O�])([\s\.,]|$)/g,
  1873. 831.  -     'D83DDE0D': /(\s|^)(8-\))([\s\.,]|$)/g,
  1874. 832.  -     'D83DDE37': /(\s|^)(:[X�])([\s\.,]|$)/g,
  1875. 833.  -     'D83DDE28': /(\s|^)(:[o�O�])([\s\.,]|$)/g,
  1876. 834.  -     '2764': /(\s|^)(&lt;3)([\s\.,]|$)/g
  1877. 835.  -   };
  1878. 836.  -   for (var code in regs) {
  1879. 837.  -     str = str.replace(regs[code], function(match, pre, smile, space) {
  1880. 838.  -       return (pre || '') + Emoji.getEmojiHTML(code)+(space || '');
  1881. 839.  -     });
  1882. 840.  -   }
  1883. 841.  -   var regs = {
  1884. 842.  -     'D83DDE0A': /(:-\))([\s\.,]|$)/g,
  1885. 843.  -     'D83DDE03': /(:-D)([\s\.,]|$)/g,
  1886. 844.  -     'D83DDE1C': /(;-[P�])([\s\.,]|$)/g,
  1887. 845.  -     'D83DDE0B': /(:-[p�])([\s\.,]|$)/g,
  1888. 846.  -     'D83DDE12': /(:-\()([\s\.,]|$)/g,
  1889. 847.  -     'D83DDE0F': /(:-?\])([\s\.,]|$)/g,
  1890. 848.  -     'D83DDE14': /(3-?\()([\s\.,]|$)/g,
  1891. 849.  -     'D83DDE22': /(:&#039;\()([\s\.,]|$)/g,
  1892. 850.  -     'D83DDE2D': /(:_\()([\s\.,]|$)/g,
  1893. 851.  -     'D83DDE29': /(:\(\()([\s\.,]|$)/g,
  1894. 852.  -     //'D83DDE15': /(:\\)([\s\.,]|$)/g,
  1895. 853.  -     'D83DDE10': /(:\|)([\s\.,]|$)/g,
  1896. 854.  -     'D83DDE21': /(&gt;\(\()([\s\.,]|$)/g,
  1897. 855.  -     'D83DDE1A': /(:-\*)([\s\.,]|$)/g,
  1898. 856.  -     'D83DDE08': /(\}:\))([\s\.,]|$)/g,
  1899. 857.  -     'D83DDC4D': /(:like:)([\s\.,]|$)/g,
  1900. 858.  -     'D83DDC4E': /(:dislike:)([\s\.,]|$)/g,
  1901. 859.  -     '261D': /(:up:)([\s\.,]|$)/g,
  1902. 860.  -     '270C': /(:v:)([\s\.,]|$)/g,
  1903. 861.  -     'D83DDC4C': /(:ok:|:��:)([\s\.,]|$)/g
  1904. 862.  -   };
  1905. 863.  -   for (var code in regs) {
  1906. 864.  -     str = str.replace(regs[code], function(match, smile, space) {
  1907. 865.  -       return Emoji.getEmojiHTML(code)+(space || '');
  1908. 866.  -     });
  1909. 867.  -   }
  1910. 868.  -
  1911. 869.  -   str = str.replace(/\n/g, '<br>');
  1912. 870.  -   if (replaceSymbols) {
  1913. 871.  -     str = str.replace(Emoji.emojiRegEx, Emoji.emojiReplace).replace(/\uFE0F/g, '');
  1914. 872.  -   }
  1915. 873.  -
  1916. 874.  -   return str;
  1917. 875.  - },
  1918. 876.  -
  1919. 877.  - emojiReplace: function (symbol) {
  1920. 878.  -   var i = 0;
  1921. 879.  -   var code = '', num;
  1922. 880.  -   while(num = symbol.charCodeAt(i++)) {
  1923. 881.  -     if (i == 2 && num == 8419) {
  1924. 882.  -       code = '003'+symbol.charAt(0)+'20E3';
  1925. 883.  -       break;
  1926. 884.  -     }
  1927. 885.  -     code += num.toString(16);
  1928. 886.  -   }
  1929. 887.  -   if (symbol.match(/[\uDDE7-\uDDFA]/)) {
  1930. 888.  -     if (cur.flagSymbol) {
  1931. 889.  -       code = cur.flagSymbol + code;
  1932. 890.  -       cur.flagSymbol = false;
  1933. 891.  -     } else {
  1934. 892.  -       cur.flagSymbol = code;
  1935. 893.  -       return '';
  1936. 894.  -     }
  1937. 895.  -   }
  1938. 896.  -   code = code.toUpperCase();
  1939. 897.  -   return Emoji.getEmojiHTML(code, symbol, true);
  1940. 898.  - },
  1941. 899.  -
  1942. 900.  - emojiRegEx: /([\uE000-\uF8FF\u270A-\u2764\u2122\u25C0\u25FB-\u25FE\u2615\u263a\u2648-\u2653\u2660-\u2668\u267B\u267F\u2693\u261d\u26A0-\u26FA\u2708]|\uD83C[\uDC00-\uDFFF]|[\u2600\u26C4\u26BE\u23F3\u2764]|\uD83D[\uDC00-\uDFFF]|\uD83C[\uDDE8-\uDDFA]\uD83C[\uDDEA-\uDDFA]|[0-9]\u20e3)/g,
  1943. 901.  -
  1944. 902.  - getCode: function(obj) {
  1945. 903.  -   var code = false;
  1946. 904.  -   if (obj.className == 'emoji') {
  1947. 905.  -     var m = obj.src.match(/\/([a-zA-Z0-9]+).png/);
  1948. 906.  -     if (m) {
  1949. 907.  -       var code = m[1];
  1950. 908.  -     }
  1951. 909.  -   } else if (obj.className == 'emoji_css') {
  1952. 910.  -     var code = obj.getAttribute('emoji');
  1953. 911.  -   }
  1954. 912.  -   return code;
  1955. 913.  - },
  1956. 914.  -
  1957. 915.  - __eof: 1}}
  1958. 916.  - try{stManager.done('emoji.js');}catch(e){}
  1959. ------
Advertisement
Add Comment
Please, Sign In to add comment