Advertisement
Guest User

cs

a guest
May 24th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. function SomToggle() {
  2. som =! som;
  3. localStorage.setItem("som",som)
  4. }
  5. function ChatInit() {
  6. if(chat_get == false) {
  7. $("#chatbox_id").contents().find("#chatbox_main_options").prepend("<li id='chatbox_sound' ><label>Som:<input type='checkbox' checked='checked' name='refresh_auto' id='som_t' style='background: transparent;'></label></li>");
  8. $("#chatbox_id").contents().find("#chatbox_sound").click(function() {
  9. SomToggle();
  10. });
  11. if(!localStorage.getItem("som")) {
  12. som = true;
  13. $("#chatbox_id").contents().find("#som_t").attr("checked",true);
  14. } else {
  15. som(localStorage.getItem("som")=="true");
  16. $("#chatbox_id").contents().find("#som_t").attr("checked",som);
  17. }
  18. if($("#chatbox_id").contents().find("#chatbox_main_options").size() > 0) {
  19. chat_get = true;
  20. }
  21. }
  22. }
  23. window.onload = function(){
  24. ChatInit();
  25. TrocaCorGeral(cor_barra,cor_2);
  26. $("iframe#fgdgdfgfd1").hide()
  27. };
  28. $(window).focus(function() {
  29. ativo = true
  30. });
  31. function onBlur() {
  32. ativo = false;
  33. for(var i = 0; i < frames.length; i++) {
  34. var loc = frames[i].location.href;
  35. if(loc.indexOf("/chatbox") >- 1) {
  36. var chat_win = frames[i];
  37. $(chat_win).focus(function() {
  38. ativo = true;
  39. });
  40. $(chat_win).blur(function() {
  41. ativo = false;
  42. });
  43. }
  44. }
  45. }
  46. $(window).blur(onBlur);function isPlaying(audelem){return!audelem.paused}function play_sound(){if((chat_ss<($("#chatbox_id").contents().find(".chatbox div#chatbox p").size()))&&(chat_ss>0)&&(($("#chatbox_id").is(":visible")==false)||(ativo==false))){if(som){document.getElementById('audiotag1').play()}pisca=true;if(ativo){document.title=gmbr_t;cont=0}else{cont=cont+1;ct_title="("+cont+") Nova Mensagem"}}if(ativo){document.title=gmbr_t;cont=0}chat_ss=$("#chatbox_id").contents().find(".chatbox div#chatbox p").size()}setInterval(ChatOnline,2000);function ChatOnline(){ChatInit();play_sound();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement