redirects-target2.html (670B)
1 <!doctype html> 2 <title>Destination of a Redirect</title> 3 <script src="stash.js"></script> 4 <script> 5 function checkScroll() { 6 // Two rAFs since the exact timing of when we cause scrolling is up to the 7 // UA. 8 requestAnimationFrame(() => { 9 requestAnimationFrame(() => { 10 let results = { 11 scrolled: (window.pageYOffset != 0), 12 }; 13 let key = (new URL(document.location)).searchParams.get("key"); 14 stashResultsThenClose(key, results); 15 }); 16 }); 17 } 18 window.addEventListener('load', checkScroll); 19 </script> 20 <style> 21 p#target { 22 margin: 2000px 0px 2000px 0px; 23 } 24 </style> 25 <body> 26 <p>Top of page</p> 27 <p id="target">target</p> 28 </body>