Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var flubb_sfx = new (function () {
- this.dir = "coui://ui/mods/com.flubbateios.sfx/";
- this.addHandler = function (msg, callback, disappear) {
- model.chatLog.subscribe(function () {
- var k = $('.div_chat_log_feed .chat_message_body');
- k.each(function () {
- var elem = $(this);
- if (elem.html() == msg) {
- if (elem.parent().attr('processed') != 'yes') {
- //run callback
- callback();
- elem.parent().attr('processed', 'yes');
- if (disappear) {
- //remove chat message
- elem.parent().css('display', 'none');
- //get rid of thing in feed
- setTimeout(function () {
- $('.div_chat_feed .chat_message_body').each(function () {
- var feed = $(this);
- if (feed.html() == elem.html()) {
- feed.parent().css('display', 'none');
- }
- })
- }, 10);
- }
- }
- }
- });
- })
- }
- })()
- $(document).ready(function () {
- flubb_sfx.addHandler('gg', function () {
- new Audio(flubb_sfx.dir + 'gg.ogg').play();
- }, false);
- flubb_sfx.addHandler('cena', function () {
- new Audio(flubb_sfx.dir + 'cena.ogg').play();
- }, true);
- flubb_sfx.addHandler('noot', function () {
- new Audio(flubb_sfx.dir + 'noot.ogg').play();
- }, true);
- flubb_sfx.addHandler('2000', function () {
- new Audio(flubb_sfx.dir + '2000.ogg').play();
- }, true);
- flubb_sfx.addHandler('violin', function () {
- new Audio(flubb_sfx.dir + 'violin.ogg').play();
- }, true);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement