diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2016-09-19 03:19:38 +0300 |
---|---|---|
committer | Steffen van Bergerem <svbergerem@omgsrsly.net> | 2016-09-28 22:59:08 +0300 |
commit | fccabf9983c0792d55cf7c86862b7a3770f8d1e0 (patch) | |
tree | 6df5d39b6b491b6a07db219d215e75d36a5e9a7f /app/views | |
parent | 459ebffa6ebaa30a01c2d7edc653764f8cf60e09 (diff) |
Extract mobile bookmarklet JS to file
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/status_messages/bookmarklet.mobile.haml | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/views/status_messages/bookmarklet.mobile.haml b/app/views/status_messages/bookmarklet.mobile.haml index e6c6227c2..0dafbc991 100644 --- a/app/views/status_messages/bookmarklet.mobile.haml +++ b/app/views/status_messages/bookmarklet.mobile.haml @@ -4,18 +4,4 @@ = render :partial => 'publisher/publisher', :locals => { :aspect => :profile, :selected_aspects => @aspects, :aspect_ids => @aspect_ids } -:javascript - 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; - } - } - - $(document).ready(function() { - if (contents.length > 0) { - $("#status_message_text").val(contents); - } - }); += javascript_include_tag "mobile/bookmarklet" |