Bookmark GoTo view-source

// Instructions // 1. Go to Chrome -> Bookmarks -> Bookmarks Manager // 2. Right-click Bookmarks Bar -> "Add Page ..." // 3. Enter "Go To Line" for Name // 4. Copy/paste the code below into URL (From-and-including "javascript:" to "void 0;" // // Now on any "view-source:..." page in Chrome, click the Bookmarks -> Go To Line menu // item to scroll to and highlight the line of your choice // ----- javascript: var lineno = prompt('Go To Line'); document.querySelectorAll('td.line-number').forEach(function(el) { var isLine = el.getAttribute('value') == lineno; if (isLine) el.scrollIntoView(); el.parentElement.style.backgroundColor = isLine ? '#ff0' : 'inherit'; }); void 0;

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.