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:
parent
b3554ec1aa
commit
15b7ee0cf8
1 changed files with 10 additions and 8 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
window.setTimeout(window.close, 2000, true);
|
window.setTimeout(window.close, 2000, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
var contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}";
|
var contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}";
|
||||||
var notes = "#{escape_javascript params[:notes]}";
|
var notes = "#{escape_javascript params[:notes]}";
|
||||||
if (notes.length > 0){
|
if (notes.length > 0){
|
||||||
|
|
@ -57,4 +58,5 @@
|
||||||
$("#publisher #status_message_fake_text").val(contents);
|
$("#publisher #status_message_fake_text").val(contents);
|
||||||
$("#publisher #status_message_text").val(contents);
|
$("#publisher #status_message_text").val(contents);
|
||||||
$('input.button')[0].removeAttribute('disabled');
|
$('input.button')[0].removeAttribute('disabled');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue