diaspora/app/views/status_messages/bookmarklet.mobile.haml
Benjamin Neff a5f538b9ae
Load jquery in the head on mobile
Some pages need jquery in the head and instead of loading it twice on
these pages, it is better and easier to load it in the head on all
pages. It should be in the cache after the first load anyway.

closes #7086
2016-09-11 01:55:25 +02:00

21 lines
730 B
Text

-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= 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);
}
});