tips:copy_section_link
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:copy_section_link [2016-10-20 21:46] – [An improved version of the script] sancaya | tips:copy_section_link [2016-10-21 04:05] (current) – [An improved version of the script] sancaya | ||
---|---|---|---|
Line 62: | Line 62: | ||
In that case '' | In that case '' | ||
- | The resulting script is here. It gives Javascript errors in some browsers, so could anyone help to debug it? | + | The resulting script is here: |
<code javascript ./ | <code javascript ./ | ||
Line 83: | Line 83: | ||
if ( document.createRange ) { | if ( document.createRange ) { | ||
rng = document.createRange(); | rng = document.createRange(); | ||
- | rng.selectNode( target ) | + | rng.selectNode( target ); |
sel = window.getSelection(); | sel = window.getSelection(); | ||
sel.removeAllRanges(); | sel.removeAllRanges(); |
tips/copy_section_link.txt · Last modified: 2016-10-21 04:05 by sancaya