Skip to content

Instantly share code, notes, and snippets.

@proimage
proimage / popup-link.html
Created Jun 23, 2020
Native Browser Popup with progressive enhancement
View popup-link.html
@proimage
proimage / dark-overlay-bookmarklet.js
Last active Apr 12, 2016
This bookmarklet toggles a dark overlay (75% black) over any page you're viewing, handy for toning down those blindingly white pages in the middle of the night. To use, copy the entire contents of this Gist, create a new bookmark in your browser (the bookmarks bar is a good, handy location to put it), and paste the Gist as the URL of the bookmark.
View dark-overlay-bookmarklet.js
javascript:(function(){overlay=document.getElementsByClassName('overlay--darken');if(overlay.length>0){overlay[0].parentNode.removeChild(overlay[0]);}else{_my_overlay=document.createElement('aside');_my_overlay.className='overlay--darken';_my_overlay.style='position:fixed;top:0;bottom:0;width:100%;pointer-events:none;background-color:rgba(0,0,0,0.75);z-index:9999;';document.getElementsByTagName('body')[0].appendChild(_my_overlay);}})();
@proimage
proimage / foundation-5-top-bar-nav-ee.html
Last active Aug 29, 2015
A Foundation 5 Top-Bar menu snippet for ExpressionEngine and Nav-EE plugin.
View foundation-5-top-bar-nav-ee.html
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1>
<a href="{path='{site_index}'}">
<img src="icon-logo.png" alt="image">
</a>
</h1>
</li>
<li class="toggle-topbar menu-icon">