1// Simple state manager 2// If not working we can try another lib: https://wicky.nillia.ms/enquire.js/ 3ssm.addStates([ 4 { 5 id: 'handled-xs', 6 query: '(max-width: 576px)', 7 onEnter: function(){ 8 9 } 10 }, 11 { 12 id: 'handled', 13 query: '(min-width: 577px) and (max-width: 767px)', 14 onEnter: function(){ 15 16 } 17 }, 18 { 19 id: 'tablet', 20 query: '(min-width: 768px) and (max-width: 992px)', 21 onEnter: function(){ 22 23 } 24 }, 25 { 26 id: 'small-desktop', 27 query: '(min-width: 993px) and (max-width: 1200px)', 28 onEnter: function(){ 29 30 } 31 }, 32 { 33 id: 'large-desktop', 34 query: '(min-width: 1201px) and (max-width: 1399px)', 35 onEnter: function(){ 36 37 } 38 }, 39 { 40 id: 'extra-large-desktop', 41 query: '(min-width: 1400px)', 42 onEnter: function(){ 43 44 } 45 }, 46 { 47 id: 'up-to-small-desktop', 48 query: '(max-width: 1200px)', 49 onEnter: function(){ 50 51 /*let P2DM = document.getElementById("P2DM"); 52 if ( document.getElementById("P2DM-mobile-container-end") != null ){ 53 document.getElementById("P2DM-mobile-container-end").appendChild(P2DM); 54 }*/ 55 56 // Move tab box to the mobile area 57 let tabBox = document.getElementById("tab-box"); 58 if ( document.getElementById("handled-tabs") != null ){ 59 document.getElementById("handled-tabs").appendChild(tabBox); 60 } 61 62 // Move FB box to the mobile area 63 let fbBox = document.getElementById("fb-box"); 64 if ( document.getElementById("handled-fb") != null ){ 65 //document.getElementById("handled-fb").appendChild(fbBox); 66 } 67 68 // Move Most popular box to the mobile area 69 let mostPopular = document.getElementById("most-popular-box"); 70 if ( document.getElementById("handled-most-popular") != null ){ 71 document.getElementById("handled-most-popular").appendChild(mostPopular); 72 } 73 74 75 76 }, 77 onLeave: function(){ 78 79 // Move FB box to the desktop area 80 let fbBox = document.getElementById("fb-box"); 81 if ( document.getElementById("xl-fb") != null ){ 82 //document.getElementById("xl-fb").appendChild(fbBox); 83 } 84 85 // Move Most popular box to the desktop area 86 let mostPopular = document.getElementById("most-popular-box"); 87 if ( document.getElementById("xl-most-popular") != null ){ 88 //document.getElementById("xl-most-popular").appendChild(mostPopular); 89 } 90 91 // Move tab box to the desktop area 92 let tabBox = document.getElementById("tab-box"); 93 if ( document.getElementById("xl-tabs") != null ){ 94 //document.getElementById("xl-tabs").appendChild(tabBox); 95 } 96 97 // Move BBC box to the desktop area 98 let bbcBox = document.getElementsByClassName('bbcBox'); 99 let bbcBoxNode = bbcBox[0]; 100 if ( document.getElementById("bbc-entry-container") != null ){ 101 //document.getElementById("bbc-entry-container").appendChild(bbcBoxNode); 102 } 103 104 } 105 }, 106 { 107 id: 'from-small-desktop', 108 query: '(min-width: 1201px)', 109 onEnter: function(){ 110 111 112 113 }, 114 onLeave: function(){ 115 116 117 } 118 }, 119]);
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.