Skip to content

Instantly share code, notes, and snippets.

View jorinvo's full-sized avatar

Jorin jorinvo

View GitHub Profile
@jorinvo
jorinvo / gridBookmarklet.js
Created August 20, 2012 22:29
useful bookmarklet to toggle a 10px grid overlay on your page for design purposes
(function(window, doc, undefined) {
var awesomeGridBookmarkletElement = doc.getElementById('awesomeGridBookmarkletElement');
if ( awesomeGridBookmarkletElement !== null) {
awesomeGridBookmarkletElement.parentNode.removeChild(awesomeGridBookmarkletElement);
return;
}
var grid = doc.createElement('div');
grid.id = 'awesomeGridBookmarkletElement';
grid.style.backgroundImage = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AgUFTcrYHXFEgAAAAxpVFh0Q29tbWVudAAAAAAAvK6ymQAAABlJREFUGNNjZGBg+M9AJCBKIROxpo0qxAsADuYCECT/rwcAAAAASUVORK5CYII=)';
grid.style.position = 'fixed';
@jorinvo
jorinvo / mousewheel.js
Created August 7, 2012 09:02
Track mouse wheel events
document.addEventListener('mousewheel', function(e) {
handleWheel(e);
}, false);
document.addEventListener('DOMMouseScroll', function(e) {
.handleWheel(e);
}, false);
var handleWheel = function(e) {
@jorinvo
jorinvo / upload.js
Created August 7, 2012 09:00
jQuery html5 uploader
(function ($) {
$.fn.html5Uploader = function (options) {
var crlf = '\r\n';
var boundary = "iloveigloo";
var dashes = "--";
var settings = {
"name": "uploadedFile",
@jorinvo
jorinvo / bookmarkableTabs.html
Created January 26, 2012 12:15
A little Example demonstrating how to implement bookmarkable tabs
<!DOCTYPE html public>
<head>
<meta charset=utf-8>
<title>Bookmarkable Tabs Demo</title>
<style>