From 61bfbc82e0b47fc268e58742cc8c1e5af66903e9 Mon Sep 17 00:00:00 2001 From: arlogn Date: Mon, 6 Jan 2014 01:07:05 +0100 Subject: [PATCH] bookmarklet publisher more usable --- app/views/status_messages/bookmarklet.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/status_messages/bookmarklet.html.haml b/app/views/status_messages/bookmarklet.html.haml index 7a2951cd4..485c8fa4a 100644 --- a/app/views/status_messages/bookmarklet.html.haml +++ b/app/views/status_messages/bookmarklet.html.haml @@ -15,10 +15,13 @@ standalone: true }); - var contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}"; - var notes = "#{escape_javascript params[:notes]}"; - if (notes.length > 0){ - contents = contents + " - " + notes; + var contents = "#{escape_javascript params[:content]}"; + if(!contents){ + contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}"; + var notes = "#{escape_javascript params[:notes]}"; + if (notes.length > 0){ + contents += " - " + notes; + } } $("#publisher").bind('ajax:success', function(){