code: def append_snipet_button_script(md):
      md.textn(
          "\n\n<script>\n"
          + "function ButtonAction(container_name){\n"
          + "if(window_big){\n"
          + "snipet_name = container_name.replace('-snipet_button','-snipet');\n"
          + 'document.getElementById("snipets-container").innerHTML = document.getElementById(snipet_name).innerHTML;\n'
          + "}\n"
          + "else{\n"
          + 'document.getElementById("snipets-container").innerHTML = null;'
          + "code_name = container_name.replace('-snipet_button','-code');\n"
          + "var range = document.createRange();\n"
          + "range.selectNode(document.getElementById(code_name));\n"
          + "alert(range);\n"
          + "}\n"
          + "}\n"
          + "function WindowResize(){\n"
          + "if(window.innerWidth > 1200){\n"
          + "window_big = true;\n"
          + "}\n"
          + "else{\n"
          + "window_big = false;\n"
          + "}\n"
          + "}\n"
          + "var window_big;\n"
          + "if(window.innerWidth > 1200){\n"
          + "window_big = true;\n"
          + "}\n"
          + "else{\n"
          + "window_big = false;\n"
          + "}\n"
          + "buttons = document.getElementsByClassName('SnipetButton')\n"
          + "for (let i = 0; i < buttons.length; i++) {\n"
          + 'buttons[i].addEventListener("click",function(){ButtonAction(buttons[i].id);},true);\n'
          + "}\n"
          + "window.onresize = WindowResize;\n"
          + "</script>\n"
      )
  
imports: import os
  import yaml
  import re
  import doc_gen_snipets
label_desc: Use image node_id 16 for calling a global function with example usage: append_snipet_button_script(md) without return types