Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bumi
Last active April 19, 2023 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumi/2d331871917228176a1d37691aabd244 to your computer and use it in GitHub Desktop.
Save bumi/2d331871917228176a1d37691aabd244 to your computer and use it in GitHub Desktop.
javascript:(function(){var e=document.location.toString().replace(/^(https?:\/\/)?(www\.)?/i,''),t=document.getElementById('nostri-container');t&&t.remove(),(t=document.createElement('div')).setAttribute('id','nostri-container'),t.classList.add(e);var n=document.createElement('script');n.src='https://zapworthy.com/public/bundle.js',t.appendChild(n);var c=document.createElement('link');c.rel='stylesheet',c.href='https://zapworthy.com/public/bundle.css',t.appendChild(c),document.body.appendChild(t);var d=document.createElement('style');d.type='text/css',d.innerHTML='#nostri-container { z-index: 9999; }',document.head.appendChild(d)})();
(function() {
var url = document.location.toString();
var cleanedUrl = url.replace(/^(https?:\/\/)?(www\.)?/i, '');
var container = document.getElementById('nostri-container');
if (container) {
container.remove();
}
container = document.createElement('div');
container.setAttribute('id', 'nostri-container');
container.classList.add(cleanedUrl);
var script = document.createElement('script');
script.src = 'https://zapworthy.com/public/bundle.js';
container.appendChild(script);
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://zapworthy.com/public/bundle.css';
container.appendChild(link);
document.body.appendChild(container);
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '#nostri-container { z-index: 9999; }';
document.head.appendChild(style);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment