This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a basic bootstrap alert dialog display thingy. | |
// It makes it easy to display a message or dialog to a user. | |
// I don't like jQuery, so I only used it where bootstrap needs it. Someone could probably clean this up slightly | |
// but I'd only recommend that if it reduces the amount of code used... | |
// I've added another file to this gist with some calling demonstrations. | |
// So, obviously, you'll need to include bootstrap and jquery in your awesome page... | |
bsalert = function() { | |
var E = function(){return document.createElement(arguments[0]);}; | |
function setordefault(it, value) { | |
if(typeof value === 'undefined' || value == null) return it; //default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ms(){ | |
var C = document.createElement('canvas'), g; | |
g = C.getContext('2d'); | |
C.setAttribute('style', | |
'margin:30px;box-shadow: 4px 7px 28px rgba(0,0,0,0.5)'); | |
C.width=640; C.height=480; | |
document.body.appendChild(C); | |
var lR=-2.2,hR=1.2,lI=-1.3,y=0,x=0,n=0,w=C.width,h=C.height, | |
cim,cre,Zre,ZimZim2,ii,zre2,f=Math.floor,d=30; | |
var hI=lI+(hR-lR)*h/w,rF=(hR-lR)/(w-1),iF=(hI-lI)/(h-1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************* | |
I think the drag and drop code in here was mostly copy-pasted | |
from http://www.html5rocks.com/en/tutorials/file/dndfiles/ | |
I don't know if I changed it, or if I messed around with it... | |
It may or may not work in your browser, so make changes | |
and share if you need to. | |
-Mike | |
-- what's it do? |