Skip to content

Instantly share code, notes, and snippets.

@redhog
Created October 9, 2010 17:19
Show Gist options
  • Select an option

  • Save redhog/618390 to your computer and use it in GitHub Desktop.

Select an option

Save redhog/618390 to your computer and use it in GitHub Desktop.
commit dfe32495de824848a421acc9694c4c7051da211c
Author: Ari Bader-Natal <[email protected]>
Date: Mon Aug 2 21:58:55 2010 -0700
added audio clips to chat message and revision saved.
diff --git a/etherpad/src/static/js/pad_chat.js b/etherpad/src/static/js/pad_chat.js
index 6f0fb20..bf9ebed 100644
--- a/etherpad/src/static/js/pad_chat.js
+++ b/etherpad/src/static/js/pad_chat.js
@@ -222,6 +222,7 @@ var padchat = (function(){
self.scrollToBottom();
}, 0);
}
+ document.getElementById('audio_chat_message').play();
},
handleUserJoinOrUpdate: function(userInfo) {
changeAuthorColorData(userInfo.userId,
diff --git a/etherpad/src/static/js/pad_savedrevs.js b/etherpad/src/static/js/pad_savedrevs.js
index 1bfd0d8..36d6cdd 100644
--- a/etherpad/src/static/js/pad_savedrevs.js
+++ b/etherpad/src/static/js/pad_savedrevs.js
@@ -168,6 +168,8 @@ var padsavedrevs = (function() {
function displaySavedTip(text) {
$("#revision-notifier .name").html(padutils.escapeHtml(text));
+ document.getElementById('audio_new_revision').play();
+
savedTipAnimator.show();
padutils.cancelActions("hide-revision-notifier");
var hideLater = padutils.getCancellableAction("hide-revision-notifier",
diff --git a/etherpad/src/templates/pad/pad_body2.ejs b/etherpad/src/templates/pad/pad_body2.ejs
index f243f06..1357649 100644
--- a/etherpad/src/templates/pad/pad_body2.ejs
+++ b/etherpad/src/templates/pad/pad_body2.ejs
@@ -70,6 +70,8 @@ limitations under the License. */ %>
%>
+<audio id="audio_chat_message" src="/static/audio/chat_message.wav" autobuffer="autobuffer"> </audio>
+<audio id="audio_new_revision" src="/static/audio/new_revision.wav" autobuffer="autobuffer"> </audio>
<div id="procdiv">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment