Adding Comodo TrustLogo code I have a Comodo certificate for my site to serve content using HTTPS.

I would like to add the Comodo TrustLogo (https://trustlogo.com/) so that it appears on every content page. The problem is that the JavaScript comprises of two parts that must be placed in specific locations according to Comodo:

a) One piece must be loaded just before the HTML HEAD closing tag.

The generic code Comodo wants me to include is: 

&lt;script type="text/javascript"&gt; //&lt;![CDATA[ 
  var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/");
  document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));
  //]]&gt;
&lt;/script&gt;


b) The second piece must be included just before the HTML BODY closing tag.

The JavaScript is this - anonymised for site-specific content:

&lt;script language="JavaScript" type="text/javascript"&gt;
  TrustLogo("https://www.example.com/path/to/image.png", "CL1", "none");
&lt;/script&gt;
&lt;a href="https://www.positivessl.com/" id="comodoTL"&gt;Positive SSL Wildcard&lt;/a&gt;


Since Bartik and other themes do not meddle with the HTML page stuff (only with the actual content) I looked into messing with the file


  core/modules/system/templates/html.html.twig


and add some content there, but stuff does not appear - it seems ignored as it doesn't even appear in the HTML source...

Please help!

Thanks,
Michel
First of all, I hope you didn't edit any files in core :)
Secondly, you can of course add the custom scripts in the HTML twig file, but you need to add this template to you active theme and clear theme registry (or all) cache in order for the changes to appear.  

Here is a complete html.html.twig file code:

{#
/**
 * @file
 * Default theme implementation for the basic structure of a single Drupal page.
 *
 * Variables:
 * - logged_in: A flag indicating if user is logged in.
 * - root_path: The root path of the current page (e.g., node, admin, user).
 * - node_type: The content type for the current node, if the page is a node.
 * - head_title: List of text elements that make up the head_title variable.
 *   May contain or more of the following:
 *   - title: The title of the page.
 *   - name: The name of the site.
 *   - slogan: The slogan of the site.
 * - page_top: Initial rendered markup. This should be printed before 'page'.
 * - page: The rendered page markup.
 * - page_bottom: Closing rendered markup. This variable should be printed after
 *   'page'.
 * - db_offline: A flag indicating if the database is offline.
 * - placeholder_token: The token for generating head, css, js and js-bottom
 *   placeholders.
 *
 * @see template_preprocess_html()
 *
 * @ingroup themeable
 */
#}
&lt;!DOCTYPE html&gt;
&lt;html{{ html_attributes }}&gt;
  &lt;head&gt;
    &lt;head-placeholder token="{{ placeholder_token|raw }}"&gt;
    &lt;title&gt;{{ head_title|safe_join(' | ') }}&lt;/title&gt;
    &lt;css-placeholder token="{{ placeholder_token|raw }}"&gt;
    &lt;js-placeholder token="{{ placeholder_token|raw }}"&gt;
    &lt;script type="text/javascript"&gt; //&lt;![CDATA[ 
      var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.comodo.com/" : "http://www.trustlogo.com/");
      document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));
      //]]&gt;
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body{{ attributes }}&gt;
    {#
      Keyboard navigation/accessibility link to main content section in
      page.html.twig.
    #}
    &lt;a href="#main-content" class="visually-hidden focusable"&gt;
      {{ 'Skip to main content'|t }}
    &lt;/a&gt;
    {{ page_top }}
    {{ page }}
    {{ page_bottom }}
    &lt;js-bottom-placeholder token="{{ placeholder_token|raw }}"&gt;
    &lt;script language="JavaScript" type="text/javascript"&gt;
      TrustLogo("https://www.example.com/path/to/image.png", "CL1", "none");
    &lt;/script&gt;
    &lt;a href="https://www.positivessl.com/" id="comodoTL"&gt;Positive SSL Wildcard&lt;/a&gt;
  &lt;/body&gt;
&lt;/html&gt;


You can put this file in your active theme /templates folder, clear cache and it'll load the logo on every page.
There are other ways to do so like using custom module to inject the code, but for simplicity, you can use this solution.