Public
Honored Contributor

Where to find javascript / cookies?

Let me preface this with I just took on the role of community admin for our Lithium system and haven't had the chance to go beyond basic free training modules so bear with my lack of skill here.    Our Lithium community was cloned from HPE community and I'm trying to remove all the HPE stuff.

 

Our system is setting HPE cookies and looking at the source of our home page I find the following links to java script on HPE servers and don't know where, in admin or studio to find this in order to remove it.   Is this something someone here can lead me to?  I'd be SO grateful.

<link href="https://dcvta86296.i.lithium.com/skins/3021692/5361f9726f003c8c5cb7b2fc5e15dab8/hpeb_responsive_v2.css" rel="stylesheet" type="text/css"/>
	

		<script src="https://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/jquery.js"></script>
		<script src="https://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/can.jquery.js"></script>
		<meta name="hp_inav_version" content="ehfcaas.3.r"/><link rel="stylesheet" type="text/css" href="https://ssl.www8.hp.com/us/en/system/styles/hpe/hpe-fontface-core.css" media="screen, print"></link><link rel="stylesheet" type="text/css" href="https://ssl.www8.hp.com/us/en/system/styles/hpe/caas-hf-v3.2/hpe-hf-r.css" media="screen, print"></link><!--  HPE CaaS Header Footer  --><!--Data Published 01/06/2017 09:47:55 PM, Template Published: UNKNOWN-->
		<script type="text/javascript" src="https://ssl.www8.hp.com/us/en/scripts/hpe/caas-hf-v3.2/hpe-hf-r-jq.js" xml:space="preserve"></script><script type="text/javascript" src="https://ssl.www8.hp.com/us/en/scripts/hpe/caas-hf-v3.2/hpe-autocomplete-loader-2-jq.js" xml:space="preserve"></script><script type="text/javascript" src="https://ssl.www8.hp.com/us/en/scripts/hpe/caas-hf-v3.2/hpe-autocomplete-loader-store-jq.js" xml:space="preserve"></script><script type="text/javascript" src="https://ssl.www8.hp.com/us/en/scripts/hpe/caas-hf-v3.2/hpe-hf-init-r-jq.js" xml:space="preserve"></script><script type="text/javascript" src="https://ssl.www8.hp.com/us/en/scripts/hpe/hpe-caas-privacy-cookie.js" xml:space="preserve"></script><!--Data Published 01/06/2017 09:47:55 PM, Template Published: UNKNOWN-->

  

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.
8 Replies 8
Honored Contributor

@kgroneman - you might find these files included under 

 

- Studio - community style - [ skin ] - wrapper 

Give kudos if you find my posts helpful or mark solution if it answers your query.
Tariq

 Thanks @TariqGrazitti.   I had a look there and can't see the javascript links that I'm looking for.   Here's what I have.  Maybe you can see something I don't recognize.

 

Page Head Top Content:

<#if coreNode.nodeType=="community">
	<#assign lang = restadmin("/nodes/type/key/community/id/${coreNode.id}/settings/name/profile.language").value >
<#elseif coreNode.nodeType=="category">
	<#assign lang = restadmin("/nodes/type/key/category/id/${coreNode.id}/settings/name/profile.language").value >
<#elseif coreNode.nodeType=="board">
	<#assign lang = restadmin("/nodes/type/key/board/id/${coreNode.id}/settings/name/profile.language").value >
<#elseif coreNode.nodeType=="chat">
	<#assign lang = restadmin("/nodes/type/key/chat/id/${coreNode.id}/settings/name/profile.language").value >      
</#if>
 
<#if !lang?has_content>
	<#if user.registered >
		<#assign lang = user.get("profile.language")/>
	<#else>
		<#assign lang = coreNode.settings.name.get("profile.language","en-us")>
	</#if>
</#if>

<#assign country = "us"/>
<#if lang=="en">
	<#assign country = "us"/>
<#elseif lang=="no">
	<#assign country = "no"/>
<#elseif lang=="ja">
	<#assign country = "jp"/>
<#elseif lang=="ko">
	<#assign country = "kr"/>
<#elseif lang=="zh-CN" || lang=="zh-TW">
	<#assign country = "cn"/>
<#elseif lang=="es">
	<#assign country = "es"/>
<#elseif lang=="ru">
	<#assign country = "ru"/>
<#elseif lang=="pt-br">
	<#assign country = "br"/>
<#elseif lang=="de">
	<#assign country = "de" />
<#elseif lang=="fr">
	<#assign country = "fr" />
<#elseif lang=="it">
	<#assign country = "it" />
<#elseif lang=="iw">
	<#assign country = "il" />
</#if>

<meta http-equiv="x-ua-compatible" content="IE=edge"/> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
<meta name="page_content" content="Products" />
<meta name="user_type" content="any" />

<meta name="allow-search" content="No" />
<meta name="company_code" content="MIcroFocus"/>
<meta name="bu" content="CORP" />
<#-- Bypass first "description" field :: Kim Groneman on 04-06-2018
<meta name="description" content="Micro Focus Community offers worldwide IT, technology, and enterprise forum support and solutions." />
-->
<meta name="keywords" content="Micro Focus Community, community.microfocus.com, Micro Focus Community home page, Micro Focus forums, Micro Focus blogs" />
<meta name="support" content="gateway" />
<meta name="segment" content="Segment Neutral" />
<meta name="target_country" content="${country}" />
<meta content="hpweb.1.3" name="hp_design_version" /> 
<meta content="applied_use" name="lifecycle" /> 
<meta content="R11343" name="web_section_id" />

<link rel="icon" type="image/vnd.microsoft.icon" href="${asset.get("/html/assets/favicon.ico")}">
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="${asset.get("/html/assets/favicon.ico")}">

<script language='JavaScript'>
        var hpmmd=window.hpmmd||{type: 'Cleansheet Wash', page:{events:[]},product:{},user:{},legacy:{},promo:{} };
        <#if page.name == "CommunityPage">
                <#assign pagename= community.id />
        <#elseif coreNode.nodeType == "community">
                <#assign pagename = community.id+":"+page.content.head.title?trim?replace(" ","-") />
        <#elseif page.context.message??>
                <#if page.context.message.parent?? >
           <#if coreNode.id?length gt 27>
           <#assign parent = coreNode.id?substring(0,27) />
           <#else>
           <#assign parent = coreNode.id  />
           </#if>
                        <#assign pagename = community.id+":"+parent+":"+page.context.message.parent.subject?trim?replace(" ","-") />
                <#else>
           <#if coreNode.id?length gt 27>
           <#assign parent = coreNode.id?substring(0,27) />
           <#else>
           <#assign parent = coreNode.id />
           </#if>
                        <#assign pagename = community.id+":"+parent+":"+page.context.message.subject?trim?replace(" ","-") />
                </#if>
        <#else>
       <#if coreNode.id?length gt 27>
       <#assign parent = coreNode.id?substring(0,27) />
        <#else>
               <#assign parent = coreNode.id  />
        </#if>
                <#assign pagename = community.id+":"+parent />
        </#if>
        hpmmd.page['name']='${pagename}';
        <!-- Update added on 2012-01-17 by Warren Brill -->
        hpmmd.page['section']='lith.nav';            
        <#if page.interactionStyle == "blog">
                hpmmd.page['traffic3']='lith.blog';
        <#elseif page.interactionStyle == "forum">
                hpmmd.page['traffic3']='lith.forum';
        <#else>
                hpmmd.page['traffic3']='lith.nav';
        </#if>
        <#if page.name == "SearchPage">
                <#assign subject = http.request.parameters.name.get("q", "") />
                hpmmd.search = {sitesearch:{keyword:'${subject?html?js_string}'}};
        </#if>
        hpmmd.account='hphqwwcommunities';
        <!-- QSI function removed on 05-14-2013 by Warren Brill -->
</script>
 
<#assign protocol = "http"/>
<#if http.request.ssl == true >
  <#assign protocol = "https"/>
</#if>
<script src="${protocol}://tags.tiqcdn.com/utag/hp/bootstrap/prod/utag.sync.js" type="text/javascript"></script>

Page Head Bottom Content:

<#include "common_var"/>
<#include "macro-header.ftl" />
<#import "user-cache" as customCache/>
<@head_content />

<meta name="core-node-id" value="${coreNode.id}" />
<meta name="page-name" value="${page.name}" />

<script type="text/javascript" src="${asset.get("/html/assets/jquery-1.10.2.min.js")}"></script>
<script type="text/javascript" src="${asset.get("/html/assets/jquery.adaptive-backgrounds.js")}"></script>
<script type="text/javascript" src="${asset.get("/html/assets/bootstrap.min.js")}"></script>
<#if page.name != "SearchPage" && page.name != "BlogConsolePage">
	<script type="text/javascript" src="${asset.get("/html/assets/jquery-labelauty.js")}"></script>
	<link rel="stylesheet" type="text/css" href="/html/assets/jquery-labelauty.css">
</#if>
<@liaAddScript>
<#if page.name != "SearchPage" && page.name != "BlogConsolePage">
$(document).ready(function(){
    $(":checkbox").labelauty({ label: false });
});
</#if>
</@liaAddScript>
<script>
$(document).ready(function(){
$('.lia-component-search-widget-location-filter a').click(function(){ $('.lia-component-search-widget-location-filter .lia-common-dropdown-menu.dropdown-menu').toggle();});
});
</script>
<#if config.getString("phase", "prod") == "stage">
<#assign hasRole = false />
<#if user.registered>
	<#assign roles = customCache.cachedRest("/users/id/${user.id}/roles",30000,false,true).roles />
	<#assign allowedRoles = customCache.cachedRest("/settings/name/custom.entitled_roles",30000,false,true).value />
	<#assign roleNamesSplit = allowedRoles?split(",") />
	<#list roles.role as role>
		<#list roleNamesSplit as roleName>
			<#-- always check role against the top level -->
			<#if role.name?string == roleName?string && role.node.@type == "community">
				<#assign hasRole = true />
				<#break />
			</#if>
		</#list>
	</#list>
</#if>
<#if hasRole >
	<!-- BEGIN LivePerson Monitor. --> 
<script type="text/javascript">window.lpTag=window.lpTag||{},"undefined"==typeof window.lpTag._tagCount?(window.lpTag={site:'46183646'||"",section:lpTag.section||"",tagletSection:lpTag.tagletSection||null,autoStart:lpTag.autoStart!==!1,ovr:lpTag.ovr||{},_v:"1.8.0",_tagCount:1,protocol:"https:",events:{bind:function(t,e,i){lpTag.defer(function(){lpTag.events.bind(t,e,i)},0)},trigger:function(t,e,i){lpTag.defer(function(){lpTag.events.trigger(t,e,i)},1)}},defer:function(t,e){0==e?(this._defB=this._defB||[],this._defB.push(t)):1==e?(this._defT=this._defT||[],this._defT.push(t)):(this._defL=this._defL||[],this._defL.push(t))},load:function(t,e,i){var n=this;setTimeout(function(){n._load(t,e,i)},0)},_load:function(t,e,i){var n=t;t||(n=this.protocol+"//"+(this.ovr&&this.ovr.domain?this.ovr.domain:"lptag.liveperson.net")+"/tag/tag.js?site="+this.site);var a=document.createElement("script");a.setAttribute("charset",e?e:"UTF-8"),i&&a.setAttribute("id",i),a.setAttribute("src",n),document.getElementsByTagName("head").item(0).appendChild(a)},init:function(){this._timing=this._timing||{},this._timing.start=(new Date).getTime();var t=this;window.attachEvent?window.attachEvent("onload",function(){t._domReady("domReady")}):(window.addEventListener("DOMContentLoaded",function(){t._domReady("contReady")},!1),window.addEventListener("load",function(){t._domReady("domReady")},!1)),"undefined"==typeof window._lptStop&&this.load()},start:function(){this.autoStart=!0},_domReady:function(t){this.isDom||(this.isDom=!0,this.events.trigger("LPT","DOM_READY",{t:t})),this._timing[t]=(new Date).getTime()},vars:lpTag.vars||[],dbs:lpTag.dbs||[],ctn:lpTag.ctn||[],sdes:lpTag.sdes||[],hooks:lpTag.hooks||[],ev:lpTag.ev||[]},lpTag.init()):window.lpTag._tagCount+=1;</script> 
<!-- END LivePerson Monitor. --> 
</#if>
</#if>

Page Header:

<div id="everything" class="everything">
	<div id="content">
	<center>
		<div id="body" class="body">
		

Page Footer:

<div style="text-align: center;">&nbsp;</div>
<div>
<table style="width: 1000px; background-color: #f0f0f0; margin-left: auto; margin-right: auto;">
<tbody>
<tr>
<td style="width: 135px;"><a href="https://community.microfocus.com/p/terms_of_use.aspx" target="_blank" rel="noopener">Terms Of Use</a>&nbsp;</td>
<td style="width: 176px;"><a href="https://community.microfocus.com/p/privacy_statement.aspx" target="_blank" rel="noopener">Privacy Statement</a></td>
<td style="width: 163px;"><a href="https://community.microfocus.com/p/download_policy.aspx" target="_blank" rel="noopener">Download Policy</a>&nbsp;</td>
<td style="width: 206px;"><a href="http://www.microfocus.com" target="_blank" rel="noopener">www.microfocus.com</a></td>
<td style="width: 146px;"><a href="http://blog.microfocus.com" target="_blank" rel="noopener">Corporate Blog</a></td>
<td style="width: 134px;"><a href="https://www.microfocus.com/about/legal#cookies" target="_blank" rel="noopener">Cookie Policy</a>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div style="text-align: center;">&nbsp;</div>
<div style="text-align: center;"><a href="http://www.microfocus.com/about/legal/" target="_blank" rel="noopener">&copy; 2001 - 2018 Micro Focus.</a></div>

Page Hitbox Content:

<#if page.name == "CropAvatarPage">
	<@liaAddScript>
		(function($) {
			$(document).one("LITHIUM:updateCoordinates",function() {
			  $(".lia-image-cropper-source-container > .lia-quilt-column-alley-left > img").data('Jcrop').setOptions({aspectRatio: 1});
			});
		})(LITHIUM.jQuery);
	</@liaAddScript>
</#if>

<#if page.name == "SearchPage">
	<@liaAddScript>
		;(function($) {
		  $(document).ready(function() {
				$('.advanced-search-link').on('click', function() {
					scrollToAdvancedSearch();
				})
		  });
		  function scrollToAdvancedSearch() {
				var scrollPos = $('#advancedSearchPanel').offset().top;
				console.log(scrollPos);
				if (scrollPos > 0) {
					$('html, body').animate({
						scrollTop: scrollPos - 120
					}, 500);
				} else {
					setTimeout(scrollToAdvancedSearch, 500);
				}
			}
		})(LITHIUM.jQuery);
	</@liaAddScript>
</#if>

<@liaAddScript>
;(function($) {
  $(document).ready(function() {

    <#-- Tooltip -->
    $('[title]').not('.lia-message-body-content [title]').tooltip();

		<#-- Tabs -->
	  $('ul.nav-tabs').each(function(){
	    // For each set of tabs, we want to keep track of
	    // which tab is active and its associated content
	    var $active, $content, $links = $(this).find('a');

	    // If the location.hash matches one of the links, use that as the active tab.
	    // If no match is found, use the first link as the initial active tab.
	    $active = $($links.filter('[href="'+location.hash+'"]')[0] || $links[0]);
	    $active.addClass('active');

	    $content = $($active[0].hash);

	    // Hide the remaining content
	    $links.not($active).each(function () {
	      $(this.hash).hide();
	    });

	    // Bind the click event handler
	    $(this).on('click', 'a', function(e){
	      // Make the old tab inactive.
	      $active.removeClass('active');
	      $content.hide();

	      // Update the variables with the new link and content
	      $active = $(this);
	      $content = $(this.hash);

	      // Make the tab active.
	      $active.addClass('active');
	      $content.show();

	      // Prevent the anchor's default click action
	      e.preventDefault();
	    });
	  });

	});
})(jQuery);
</@liaAddScript>


<!-- Start Google Analytics -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-44010430-16', 'auto');
  ga('send', 'pageview');

</script>
<!-- End Google Analytics -->
--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.

@kgroneman - Could you please check inside below files as well. These are macros which you can find under Studio - Endpoint - Macros 

 

<#include "common_var"/>
<#include "macro-header.ftl" />
<#import "user-cache" as customCache/>
<@head_content />

Most probably it might be inside head_content method which is created under one of above macros. 

 

Also, please make sure you under skin wrapper which is currently activated on community. 

 

Give kudos if you find my posts helpful or mark solution if it answers your query.
Tariq

Thanks!  I found this in the common_var.  Any idea what this does?

<#assign urllower = http.request.url?lower_case />
<#assign split = urllower?contains("hpebsplit.sdc.hp.com") />
<#assign stage = urllower?contains("http://h30500.www3.hp.com") />

I couldn't find these:

<#include "macro-header.ftl" />
<#import "user-cache" as customCache/>
<@head_content />

Here's what I see under Studio > Endpoint > Macros:

macros.jpg

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.

@kgroneman - 

 

<#assign urllower = http.request.url?lower_case />
<#assign split = urllower?contains("hpebsplit.sdc.hp.com") />
<#assign stage = urllower?contains("http://h30500.www3.hp.com") />

1. First line getting the current URL and making it to all lowercase.

2. Second line checking if URL contains hpebsplit..... in current URL .

3. Third line checking if URl contains h305... In current URL. 

 

Regarding the

<#include "macro-header.ftl" />

Could you please check if you can find this in custom components? If not,  this might be hidden macro. 

You can open it by entering the direct URL. 

E.g if you macro URl is

 

Http.//communtiy-url/macrourl/macro-name. 

 

You need to open any existing macor and replace the macro name from URL with macro-header or macro-header.flt and press enter. 

 

<#import "user-cache" as customCache/>

User-cache is macro. You can find in your macro list .

<@head_content />

This is a method defined in macro either inside user-cache or macro-header.

 

Give kudos if you find my posts helpful or mark solution if it answers your query.
Tariq

Yes!   That's where it is.  At least some of them.  Thank you for your help!  I need to get a developer to look at these and figure out if we can remove/change them.  I *really* appreciate the help.  I found this in the hidden macro-header

<#macro head_content ct=country lg=l>
	<#if (http.request.ssl == true)>
		<script src="https://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/jquery.js"></script>
		<script src="https://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/can.jquery.js"></script>
		${settings.name.get("hpe_header.head_styles_${ct}_ssl")}
		${settings.name.get("hpe_header.head_scripts_${ct}_ssl")}
	<#else>
		<script src="http://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/jquery.js"></script>
		<script src="http://h50007.www5.hpe.com/caas-static/js/framework/jquery/v-1-8/can.jquery.js"></script>
		${settings.name.get("hpe_header.head_styles_${ct}")}
		${settings.name.get("hpe_header.head_scripts_${ct}")}
	</#if>
</#macro>

 

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.
Not applicable

Thanks

Not applicable

okay

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.