Fix the bookmarklet when using paramters

... because setting values without waiting for the browser to finish the DOM rendering is evil ...
This commit is contained in:
Dennis Schubert 2012-07-26 23:57:28 +03:00
parent b3554ec1aa
commit 15b7ee0cf8

View file

@ -48,6 +48,7 @@
window.setTimeout(window.close, 2000, true);
});
$(document).ready(function(){
var contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}";
var notes = "#{escape_javascript params[:notes]}";
if (notes.length > 0){
@ -57,4 +58,5 @@
$("#publisher #status_message_fake_text").val(contents);
$("#publisher #status_message_text").val(contents);
$('input.button')[0].removeAttribute('disabled');
});