javascript-errors-notifier
javascript-errors-notifier copied to clipboard
Open `view-source:http://` on specified line
Any one have ideas how to open view-source:https://github.com/barbushin/javascript-errors-notifier/issues/new scrolled to specified line?
Well I think I came up with a solution.
Step 1 Get the full source of the page and split it by newline: document.documentElement.innerHTML.split('\n');
Step 2 Create a new tab in the browser and display the source in a custom template with each line in a separate span, for example span id="line-12"
Step 3 Jump to the specific id using window.location.hash = '#line-12'.
I think this should do the trick.
i dont understand it.