PageSourceSearch

https://www.theinvestorscentre.co.uk/?code-snippets-js-snippets=head&ver=342

js theinvestorscentre.co.uk collected 2026-10-09 21:42:45 UTC 1,854 bytes, 6 lines download raw bytes

1(function(){'use strict';document.addEventListener('DOMContentLoaded',function(){document.querySelectorAll('.rp-mini-bar-row').forEach(function(r){var v=r.querySelector('.rp-mini-bar-val');var f=r.querySelector('.rp-mini-bar-fill');if(v&&f){var num=parseFloat(v.textContent);f.style.width=(num||0)*20+'%'}})})})();(function(){var activeTimer=null;var reduceMotion=window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches;function settleScroll(target){if(activeTimer)clearInterval(activeTimer);var attempts=0;function stop(){clearInterval(activeTimer);activeTimer=null;window.removeEventListener('wheel',stop);window.removeEventListener('touchstart',stop);window.removeEventListener('keydown',onKey)}
2function onKey(e){if(/^(Arrow|Page|Home|End|Tab| )/.test(e.key)||e.key==='Spacebar')stop();}
3window.addEventListener('wheel',stop,{passive:!0});window.addEventListener('touchstart',stop,{passive:!0});window.addEventListener('keydown',onKey);activeTimer=setInterval(function(){attempts++;var margin=parseFloat(getComputedStyle(target).scrollMarginTop)||0;var offBy=target.getBoundingClientRect().top-margin;if(Math.abs(offBy)>4){target.scrollIntoView({behavior:reduceMotion?'auto':'smooth',block:'start'})}else if(attempts>3){stop();return}
4if(attempts>=12)stop();},300)}
5function targetFor(hash){if(!hash||hash.length<2)return null;try{return document.getElementById(decodeURIComponent(hash.slice(1)))}catch(e){return null}}
6document.addEventListener('click',function(e){var link=e.target.closest&&e.target.closest('a[href*="#"]');if(!link)return;if(link.origin!==location.origin||link.pathname!==location.pathname)return;var target=targetFor(link.hash);if(target)settleScroll(target);});window.addEventListener('load',function(){var target=targetFor(location.hash);if(target)setTimeout(function(){settleScroll(target)},200)})})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.