Add Preview button and link to bug to patch review bar
Created attachment 68169 [details] Patch
Comment on attachment 68169 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68169&action=review > BugsSite/code-review.js:257 > + $(document.body).prepend('<div id="toolbar"><div class="actions"><button id="preview_comments">Preview</button><button id="post_comments">Publish</button></div><div class="message"><a href="show_bug.cgi?id=' + bug_id + '" target="_blank">bug ' + bug_id + '</a> <span class="commentStatus"></span> <span class="help">Double-click a line or click or drag on line numbers to add a comment.</span></div></div>'); Thanks for writing this patch. This should work great. The only problem is that bug_id won't necessarily be defined when this code runs. This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment. I'll land a modified version of this patch with just the preview button.
Committed r67927: <http://trac.webkit.org/changeset/67927>
(In reply to comment #2) > The only problem is that bug_id won't necessarily be defined when this code runs. This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment. I'll land a modified version of this patch with just the preview button. Can you help me create a version of this that adds the bug link when the details page loading is complete?