Skip to content

Instantly share code, notes, and snippets.

View themorgantown's full-sized avatar

Daniel themorgantown

View GitHub Profile
<div id="DOCUMENTNAME_hype_container" style="position:relative;overflow:hidden;width:800px;height:400px;">
<!-- inserted loader code: -->
<div style="position:absolute;height:400px;top:0;left:0px;">
<img src="image.jpg">
<h3 style="color:gray;">Loading...</h3>
</div>
<!-- end inserted loader code -->
<script type="text/javascript" charset="utf-8" src="DOCUMENTNAME.hyperesources/DOCUMENTNAME_hype_generated_script.js?69860"></script>
@themorgantown
themorgantown / DetectLandScape.html
Created March 13, 2014 19:16
This simple HTML document detects Landscape mode on iPhones and encourages you to get back into portrait.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta content="width=600" name="viewport">
<style>
/* Portrait */
@media screen and (orientation:portrait) {
/* Portrait styles */
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="chrome=1,IE=9" http-equiv="X-UA-Compatible" />
<meta content="user-scalable=yes, width=650" name="viewport" />
<title></title>
// only run on the gesture end (mouse/touch up)
if(event['hypeGesturePhase'] == hypeDocument.kHypeGesturePhaseEnd) {
// use jquery-collision to determine the overlap of the collision box and piece
var returnDivs = $("#collisionBox").collision($("#piece"), {"as":"<div />"});
// if there's not a collision at all, just bail out
if(returnDivs.length != 1) {
return;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
<title>mydocument</title>
<style>
html {
height:100%;
}
@themorgantown
themorgantown / detectVisitedScenes.js
Last active August 29, 2015 14:04
Detect if a scene has been seen in Tumult Hype, and adjust the UI accordingly.
// the buttons in your document should have the unique element id in this format:
// buttonaB. This button would be the button corresponding to scene A, and would be placed shown on Scene B.
// example document: http://tumult.com/support/examples/28995-detectivisitedScene.zip
window.visitedscenes.push(hypeDocument.currentSceneName());
// If Scene A is in the list of scenes visited,
if (window.visitedscenes.indexOf("A") > -1) {
// Change the color of buttona + scenename to be red.
@themorgantown
themorgantown / example.js
Created August 21, 2014 23:34
my gist description
<script type="text/javascript">
window.onresize = function(event) {
// Input the Width and the Height of your original document. Just Numbers!
var ratioScale = 1108 / 831;
// get the width of the enclosing Div for the Hype element
var currentWidth = document.getElementById('container').offsetWidth;

Keybase proof

I hereby claim:

  • I am themorgantown on github.
  • I am danielmorgan (https://keybase.io/danielmorgan) on keybase.
  • I have a public key whose fingerprint is 6F48 255B 5D85 310E 3C9E 0508 33A2 80FA 11A0 1A39

To claim this, I am signing this object:

.group:after, .module:after, .module .stories:after, .module article:after, .article-contributors:after, .author-details:after {
content: "";
display: table;
clear: both
}
html {
margin: 0;
padding: 0;
border: 0;

S3 Website "Index Document"

index.html:

<html>
<head>
<title>403 Forbidden</title>
</head>
<body>