1 2 const layerIDs = [{"_id":"618e687998e9690007824487","domain":"testproperty.ams.to","dSEId":575668,"footerId":575668,"id":"618e687998e9690007824487"},{"_id":"6141fe591f9bb10007a142c4","domain":"mehr-tanken.de","dSEId":1216088,"footerId":1216088,"id":"6141fe591f9bb10007a142c4"},{"_id":"67604fa5eacfb2000885bbbc","domain":"markt.roadbike.de","dSEId":1215420,"footerId":1215420,"id":"67604fa5eacfb2000885bbbc"},{"_id":"67604f820635c80008051c91","domain":"markt.mountainbike-magazin.de","dSEId":1215420,"footerId":1215420,"id":"67604f820635c80008051c91"},{"_id":"60ccc6b89618bb000728cc83","domain":"*.womenshealth.de","dSEId":1216727,"footerId":1216727,"id":"60ccc6b89618bb000728cc83"},{"_id":"60ccc66f0788240008125214","domain":"*.webauto.de","dSEId":527286,"footerId":527286,"id":"60ccc66f0788240008125214"},{"_id":"60ccc65a078824000812520d","domain":"*.runnersworld.de","dSEId":1216267,"footerId":1216267,"id":"60ccc65a078824000812520d"},{"_id":"60ccc5509618bb000728cc7e","domain":"*.reise-magazin.com","dSEId":1220849,"footerId":1220849,"id":"60ccc5509618bb000728cc7e"},{"_id":"60ccc5339618bb000728cc7d","domain":"*.promobil.de","dSEId":1215862,"footerId":1215862,"id":"60ccc5339618bb000728cc7d"},{"_id":"60ccc5010788240008125206","domain":"*.power-couple.de","dSEId":1220845,"footerId":1220845,"id":"60ccc5010788240008125206"},{"_id":"60ccbff18668a3000775bc03","domain":"*.outdoor-magazin.com","dSEId":1216075,"footerId":1216075,"id":"60ccbff18668a3000775bc03"},{"_id":"60ccbfc807882400081251f5","domain":"*.mps-vermarktung.de","dSEId":1220842,"footerId":1220842,"id":"60ccbfc807882400081251f5"},{"_id":"60ccbd4b8668a3000775bc01","domain":"*.mph-health.de","dSEId":527087,"footerId":527087,"id":"60ccbd4b8668a3000775bc01"},{"_id":"60ccbd2407882400081251ef","domain":"*.mountainbike-testival.de","dSEId":526987,"footerId":526987,"id":"60ccbd2407882400081251ef"},{"_id":"60ccbbec07882400081251e6","domain":"*.motorradonline.de","dSEId":1215589,"footerId":1215589,"id":"60ccbbec07882400081251e6"}
2,{"_id":"60ccbbca07882400081251e5","domain":"*.motorpresse.de","dSEId":1220806,"footerId":1220806,"id":"60ccbbca07882400081251e5"},{"_id":"60ccbbb007882400081251e4","domain":"*.motor-klassik.de","dSEId":1220800,"footerId":1220800,"id":"60ccbbb007882400081251e4"},{"_id":"60ccbb9407882400081251e3","domain":"*.menshealth.de","dSEId":1216104,"footerId":1216104,"id":"60ccbb9407882400081251e3"},{"_id":"60ccbb309618bb000728cc52","domain":"*.mehr-tanken.de","dSEId":1216088,"footerId":1216088,"id":"60ccbb309618bb000728cc52"},{"_id":"60fe9c9986fe210007005f10","dSEId":1232988,"footerId":1232988,"domain":"*.lauf-coaching.de","id":"60fe9c9986fe210007005f10"},{"_id":"60d07c470682500007b02610","domain":"*.idm.de","dSEId":1220794,"footerId":1220794,"id":"60d07c470682500007b02610"},{"_id":"60ccbabd07882400081251d9","domain":"*.flugrevue.de","dSEId":1298178,"footerId":1298178,"id":"60ccbabd07882400081251d9"},{"_id":"6981ec7886829f00088c86c5","domain":"*.euromoto.racing","dSEId":1431481,"footerId":1431481,"id":"6981ec7886829f00088c86c5"},{"_id":"60ccb91407882400081251cf","domain":"*.cavallo.de","dSEId":1213976,"footerId":1213976,"id":"60ccb91407882400081251cf"},{"_id":"60ccb8bf07882400081251cd","domain":"*.caraworld.de","dSEId":527239,"footerId":527239,"id":"60ccb8bf07882400081251cd"},{"_id":"60cccf400788240008125231","domain":"*.caravaning.de","dSEId":603642,"footerId":603642,"id":"60cccf400788240008125231"},{"_id":"60ccb8a59618bb000728cc4d","domain":"*.cararent.de","dSEId":527057,"footerId":527057,"id":"60ccb8a59618bb000728cc4d"},{"_id":"63d3b75a1728d600085597e7","domain":"*.bike-x.de","dSEId":1215420,"footerId":1215420,"id":"63d3b75a1728d600085597e7"},{"_id":"698b44fc05fbb80008c084df","dSEId":1427854,"footerId":1427854,"domain":"*.bigbangmoovement.de","id":"698b44fc05fbb80008c084df"},{"_id":"69ccd320c78dbc0009e8af6e","domain":"*.b2bmoovement.de","dSEId":1457738,"footerId":1457738,"id":"69ccd320c78dbc0009e8af6e"},{"_id":"6089241b1c033a00066c2fbc","domain":"*.auto-motor-und-sport.de","dSEId":1215440,"footerId":1215440,"id":"6089241b1c033a00066c2fbc"},{"_id":"62d7b6db2accb0000893068a","domain":"*.ams-kongress.de/en","dSEId":1220778,"footerId":1220778,"id":"62d7b6db2accb0000893068a"},{"_id":"60ccb86d9618bb000728cc4c","domain":"*.ams-kongress.de","dSEId":1220778,"footerId":1220778,"id":"60ccb86d9618bb000728cc4c"},{"_id":"60892df20577960006059cac","domain":"*.aerokurier.de","footerId":1297515,"dSEId":1297515,"id":"60892df20577960006059cac"},{"_id":"60ccb83907882400081251cb","domain":"*.aerokurier-markt.de","dSEId":1220772,"footerId":1220772,"id":"60ccb83907882400081251cb"},{"_id":"60ccb81807882400081251ca","domain":"*.aero.de","dSEId":527290,"footerId":527290,"id":"60ccb81807882400081251ca"},{"_id":"60cc9c979618bb000728cacc","domain":"*.1000ps.de","dSEId":1216762,"footerId":1216762,"id":"60cc9c979618bb000728cacc"},{"_id":"697887a76f417c00086950f0","domain":"*.1000ps.at","dSEId":1415394,"footerId":1415394,"id":"697887a76f417c00086950f0"}]; 3 4 function MPS_showConsent(consent) { 5 if (!consent) { 6 console.error("Found no consent(DSE or Footer)!"); 7 return; 8 } 9 10 const domain = window.location.hostname; 11 const path = window.location.pathname; 12 13 if (domain == "localhost") { 14 console.info("Domain is localhost!"); 15 return; 16 } 17 18 let domainArray = domain.split("."); 19 if(domainArray.length < 3){ 20 domainArray.unshift("www"); // for domains without subdomain, e.g. "idm.de" 21 } 22 23 let dseID; 24 let footerID; 25 let isInExact = false; 26 let isInOther = true; 27 let includePath = false; 28 29 if (!layerIDs || layerIDs.length <= 0) { 30 console.error("Found no IDs!"); 31 return; 32 } 33 let exactDomains = layerIDs.filter((layer,i)=>{if(layer.domain){ 34 let array = layer.domain.split("."); 35 if(array[0]!= "*"){ 36 return true; 37 }else{return false } 38 }}) 39 let otherDomains = layerIDs.filter((layer,i)=>{if(layer.domain){ 40 let array = layer.domain.split("."); 41 if(array[0]== "*"){ 42 return true; 43 }else{return false } 44 }}) 45 46 if(exactDomains && exactDomains.length){ 47 exactDomains.map((layer, j) => { 48 if (layer.domain) { 49 let array = layer.domain.split("."); 50 if (array[0] == domainArray[0] && array[1] == domainArray[1] && array[2] == domainArray[2]) { 51 dseID = layer.dSEId ? layer.dSEId : null; 52 footerID = layer.footerId ? layer.footerId : null; 53 isInExact = true; 54 isInOther = false;
55 } 56 } 57 }); 58 } 59 60 if(!isInExact && otherDomains && otherDomains.length){ 61 otherDomains.map((layer, j) => { 62 if (layer.domain) { 63 let array; 64 let pathArray = layer.domain.split("/"); 65 let domainPath; 66 if(layer.domain.includes("/")){ 67 array = layer.domain.split("/")[0].split(".") 68 } 69 else{ 70 array = layer.domain.split(".") 71 } 72 73 if(path){ 74 domainPath = path.split("/"); 75 } 76 if(domainPath && domainPath.length > 2 && pathArray && pathArray.length > 1 && !includePath){ 77 if (array[0] == "*" && array[1] == domainArray[1] && array[2] == domainArray[2] && domainPath[1] == pathArray[1]) { 78 dseID = layer.dSEId ? layer.dSEId : null; 79 footerID = layer.footerId ? layer.footerId : null; 80 isInExact = false; 81 isInOther = true; 82 includePath = true; 83 } 84 else if(array[0] == "*" && array[1] == domainArray[1] && array[2] == domainArray[2]){ 85 dseID = layer.dSEId ? layer.dSEId : null; 86 footerID = layer.footerId ? layer.footerId : null; 87 isInExact = false; 88 isInOther = true; 89 } 90 } 91 else{ 92 if (array[0] == "*" && array[1] == domainArray[1] && array[2] == domainArray[2] && !layer.domain.includes("/") && !includePath) { 93 dseID = layer.dSEId ? layer.dSEId : null; 94 footerID = layer.footerId ? layer.footerId : null; 95 isInExact = false; 96 isInOther = true; 97 } 98 } 99 } 100 }); 101 } 102 103 104 if (consent == "DSE") { 105 if (!window._sp_) { 106 return; 107 } 108 if (!dseID) { 109 return; 110 } 111 window._sp_.gdpr.loadPrivacyManagerModal(dseID); 112 } else if (consent == "Footer") { 113 if (!window._sp_) { 114 return; 115 } 116 if (!footerID) { 117 return; 118 } 119 window._sp_.gdpr.loadPrivacyManagerModal(footerID); 120 } else { 121 console.error("Consent is not available(just support DSE or Footer)!"); 122 return; 123 } 124} 125 126 const MPS_checkConsentHashTrigger = () => { 127 if(window.location.hash.indexOf("mps_show_privacy=dse") !== -1) { 128 MPS_showConsent("DSE"); 129 } 130 131 if(window.location.hash.indexOf("mps_show_privacy=footer") !== -1) { 132 MPS_showConsent("Footer"); 133 } 134 }; 135 136 window.addEventListener("load", () => { 137 MPS_checkConsentHashTrigger(); 138 }, false); 139 140 window.addEventListener("hashchange", () => { 141 MPS_checkConsentHashTrigger(); 142 }, false); 143 144
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.