Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SomToggle() {
- som =! som;
- localStorage.setItem("som",som)
- }
- function ChatInit() {
- if(chat_get == false) {
- $("#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>");
- $("#chatbox_id").contents().find("#chatbox_sound").click(function() {
- SomToggle();
- });
- if(!localStorage.getItem("som")) {
- som = true;
- $("#chatbox_id").contents().find("#som_t").attr("checked",true);
- } else {
- som(localStorage.getItem("som")=="true");
- $("#chatbox_id").contents().find("#som_t").attr("checked",som);
- }
- if($("#chatbox_id").contents().find("#chatbox_main_options").size() > 0) {
- chat_get = true;
- }
- }
- }
- window.onload = function(){
- ChatInit();
- TrocaCorGeral(cor_barra,cor_2);
- $("iframe#fgdgdfgfd1").hide()
- };
- $(window).focus(function() {
- ativo = true
- });
- function onBlur() {
- ativo = false;
- for(var i = 0; i < frames.length; i++) {
- var loc = frames[i].location.href;
- if(loc.indexOf("/chatbox") >- 1) {
- var chat_win = frames[i];
- $(chat_win).focus(function() {
- ativo = true;
- });
- $(chat_win).blur(function() {
- ativo = false;
- });
- }
- }
- }
- $(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