PageSourceSearch

https://connections.nationalgrid.co.uk/public/javascripts/angular.…?585.Connections.20260817.24402.1.b

js nationalgrid.co.uk collected 2026-09-24 09:01:43 UTC 2,162 bytes, 5 lines download raw bytes

1angular.module("universal-collapsing-menu",[]).controller("universal-collapsingMenuCtrl",["$window","$element","$timeout",function($window,$element,$timeout){var vm=this;var topMenuItems=$element.find("ul \x3e li:not(.universal-collapsing-menu__show-more,.in-dropdown)");var topMenuHiddenItems=$element.find("ul \x3e li.in-dropdown");var topMenuShow=$element.find(".universal-collapsing-menu__show-more");var wrapHeight=50;vm.showMore=false;vm.isFocused=false;vm.hiddenLinks=[];var prevWindowWidth=
2angular.element($window).innerWidth();vm.init=function(mobileMenu){vm.mobileMenu=mobileMenu;if(vm.mobileMenu)window.addEventListener("click",function(e){if(!this.document.getElementById("universal-collapsing-menu__show-more").contains(e.target))$timeout(function(){vm.showMore=false},1)})};vm.check=function(force){if(!force){var checkedWindowWidth=angular.element($window).innerWidth();if(checkedWindowWidth===prevWindowWidth)return}prevWindowWidth=checkedWindowWidth;topMenuItems.show();if($element.height()>
3wrapHeight){var index=topMenuItems.length-1;while($element.height()>wrapHeight){topMenuItems.eq(index--).hide();if(!vm.mobileMenu&&index<1)break;else if(vm.mobileMenu&&index<0)break}}$timeout(function(){vm.populateHidden()})};vm.populateHidden=function(){vm.hiddenLinks=[];var hidden=topMenuItems.filter(":hidden");if(!hidden)return;hidden.each(function(i,link){link=angular.element(link).find("a");vm.hiddenLinks.push({href:link.attr("href"),text:link.text()})});topMenuHiddenItems.each(function(i,link){topMenuHiddenItems.eq(i).hide();
4link=angular.element(link).find("a");vm.hiddenLinks.push({href:link.attr("href"),text:link.text()})})};vm.toggleOpen=function(doOnMobile){if(doOnMobile==vm.mobileMenu)vm.showMore=!vm.showMore};vm.accessibleToggle=function(event){if(vm.isFocused&&event.which===13)vm.showMore=!vm.showMore};vm.focusButton=function(){vm.isFocused=true};vm.blurButton=function(){vm.isFocused=false};vm.close=function(){if(!vm.mobileMenu)vm.showMore=false};angular.element($window).bind("resize",vm.check);angular.element($window).bind("wpd.resize",
5function(){vm.check(true)});vm.check(true);$timeout(function(){vm.check(true)},1)}]);

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.