var script = document.createElement('script'); script.src = "https://rawgit.com/dd7531/autopxls/master/autopxls.js"; script.onload = function () { var images = [ { title: "Ukr", x: 509, y: 493, image: "https://i.imgur.com/NPWEVZW.png" } ] AutoPXLS(images); }; document.head.appendChild(script);