Discussions » Demandes de création de scripts
Change Facebook Notification Sound - (Convert Chrome extension to userscript)
I've looked through and rewritten it without jQuery so it's faster. But I'm still dissatisfied with setInterval 1000 (checking each second) so I changed it to 5 seconds.
You can change parts you wish on your PC it's quite easy code... https://greasyfork.org/uk/scripts/13346-change-facebook-notification-sound/code
I don't see a need in interface there are two possible variables in line 18 and 19, url and interval.
Don't use interval lower than 2 your browser could lag with it.
Thanks,
but is there any way to add a button in the chat settings menu, which then opens a popup and lets us choose a sound, be it URL or local location on disk. Also a reset feature would be nice too.
And I have lowered the interval to one second, 5 seconds is just too much..
As I said, it would be easier to change url in line 18, edit script and you'll see. It's just copy/paste.
If you'll have problems with changing it, I'll make interface especially for you.
Well for some reason if I change anything it doesn't work.
So I was thinking of, adding a button in the fb chat settings that would open an interface to choose file be it from url or locally.
Something like this:
And maybe also add an option to change the interval too?
I've added interface but it's without local option. I'm sorry but GM_config (that I used) does not have 'file' type field. And it would take more time to write it down.
If you wish you could make another request about local option, but I can't help you there...
You can find settings window in Greasemonkey's "User Script Commands" http://wiki.greasespot.net/Greasemonkey_Manual:Monkey_Menu
ok.
But where is the button to open the UI?
I can't find it..
You can probably just store base64-encoded file contents (atob()
and btoa()
) with GM_setValue/GM_getValue. However there's a possibility of hitting some userscript data size limit.
And another problem is when we click on the chat window that has a new message, it plays the sound again, as if another message was received. And I've also checked the chrome extension and this doesn't happen there.
http://take.ms/CHypE Here is a small screencast, also I'll check about chat window problem.
I've added screenshots to a userscript page
Alright, looking forward to your update.
I showed current version.
I pushed version update, also here is another message sound I used https://instaud.io/_/dEa.mp3
No double sounds and I've cleaned intervals now.
Just noticed there is still double sound, when reloading/opening a page.
Ok I'll check it on Seamonkey, also I cold have fixed one thing abd broken another, this stuff often needs debugging sorry about that I was just writing down small script ))), also could you check maybe you have two versions of script in script list? (if yes telodar thee older one)
1000% sure I have only 1 version of it installed.
Also another problem is that when we have more then 1 tab open we can hear the sound multiple times, once from each tab.
Khm, ok I'll look into it, *(about multiple sound in multiple tabs, I haven't checked it)
I'm not sure I've fixed everything, please check new version on multiple windows...
Now when we click on the chat windows in the newly opened tab the sound plays again (even multiple times..).
Also if the message has been received a while ago and later when we click on the window with new message(s) the sound plays again. This might be causing the other thing to happen.
And if a message was received while offline, once we open fb the sound plays, even though the message might have been sent hours ago, maybe days.
Now sound would only be played on increase in messages ) (I've changed a lot of code and now I hope it would work good cross tabs) I'm also not sure if it would play multiple times, please check now...
I'm not using facebook much so I'm bad at testing it. Also I think it's almost done, I'm sorry it took so long to fix it...
WTF. Now it keeps playing the sound over and over as many times as there are tabs open.
EDIT:
The previous version (0.2.2) seems to be better in that regard,
but one small problem there too.If a facebook tab is in focus (the one that we are curently looking at), the sound doesn't play.
I enabled fb chat sounds, and the original sound does play.
EDIT 2:
v0.2.2 - On the first message received sound doesn't play, but after that the sound does play.
Not a big deal, but I wanted to point it out.
Oh, so I've broken it once more, ok, I'll make it work but on this weekend, the first message I'll fix it... )
Please try v0.2.4 it might not fix initial sound but I recovered it to version 0.2.2 and added changes I hipe might fix it on initial launch. I can't replicate them though. In the end you can use my skype dirrectly and test it with me online. *(skype login: dexmaster)
OK, will test it now
Seems to be working fine, but the initial sound still doesn't play
Ok, I have just one more requirement.
Is it possible that when I disable the sound through the greesemonkey script commands, to disble the sounds instantly without the need to reload the page.?
Because what's the point of the enable/disable option if I have to reload the page...
I could just as easily just disable the whole script and reload the page (heck, it's even faster).
But the point is to not have to reload the page at all.
And another thing, is it possible to get the initial sound to play? (it still doesn't work)
Change Facebook Notification Sound - (Convert Chrome extension to userscript)
So there is this Chrome extension. And of course it won't work on Firefox, or any other browser for that matter.
What I'm asking here is someone to make it into a userscript that will play a sound from a location on our PC or from a web-url. For Example