pinned - JS script for html href inside html

date: 12/09/2024

language: JS

utility: HTML in HTML loader

do you wonder how my site works? or about how to rice like me? well here i will post code snippets and sometimes full files for my dotfiles :D

this is what a code snippet would look like

the code bellow is also the one that runs my blog, the webring, and this page, though with different variable name, really help tidy things up and keep track of things more easily

// requires jquery

    $(function () : void {
  var includes = $("[data-code]");
  $.each(includes, function () : void {
    var file = "../code/snippets/" + $(this).data("code") + ".html";
    $(this).load(file);
  });
})