javascript-errors-notifier icon indicating copy to clipboard operation
javascript-errors-notifier copied to clipboard

Open `view-source:http://` on specified line

Open barbushin opened this issue 11 years ago • 2 comments

Any one have ideas how to open view-source:https://github.com/barbushin/javascript-errors-notifier/issues/new scrolled to specified line?

barbushin avatar Dec 22 '14 14:12 barbushin

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.

woutervandiggelen avatar Feb 08 '15 11:02 woutervandiggelen

i dont understand it.

Tcoop69 avatar Jul 04 '16 06:07 Tcoop69