Skip to content

Instantly share code, notes, and snippets.

@kayakaya
Created March 17, 2011 06:33
Show Gist options
  • Save kayakaya/873931 to your computer and use it in GitHub Desktop.
Save kayakaya/873931 to your computer and use it in GitHub Desktop.
diff of zenback.rb
diff --git a/plugin/zenback.rb b/plugin/zenback.rb
index c6717a5..9e1ffc9 100644
--- a/plugin/zenback.rb
+++ b/plugin/zenback.rb
@@ -3,7 +3,25 @@
# You can redistribute it and/or modify it under GPL.
if @mode == 'day'
add_body_leave_proc do
- @conf['zenback.script'] || ''
+ <<-HTML
+<div id="zenback">
+ #{@conf['zenback.script'] || ''}
+</div>
+ end
+ add_header_proc do
+ <<-HTML
+<script type="text/javascript">
+$(function () {
+ var div_comment = $('div.comment').html();
+ var div_comment_form = $('div#comment-form-section').html();
+
+ $('div.comment').remove();
+ $('div#comment-form-section').remove();
+ $('div#zenback').before(div_comment);
+ $('div#zenback').before(div_comment_form);
+});
+</script>
+HTML
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment