Skip to content

Instantly share code, notes, and snippets.

@themorgantown
Last active October 26, 2018 15:07
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 themorgantown/dd02eb19e5026f4ceb79ec3cff60294b to your computer and use it in GitHub Desktop.
Save themorgantown/dd02eb19e5026f4ceb79ec3cff60294b to your computer and use it in GitHub Desktop.
Hype Dashboard Widget Example
<!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>1024</title>
<style>
html {
height:100%;
}
body {
background-color:#FFFFFF;
margin:0;
height:100%;
}
</style>
<style>
#1024_hype_container {
background-image:url(Default@2x.png);
background-size: 100% 100%;
}
</style>
<script type="text/javascript" src="AppleClasses/AppleWidget.js"></script>
<script type="text/javascript" charset="utf-8">
function widgetIsReady(hypeDocument, element, event) {
if(window.HYPE_loadedWidget == null) {
window.widget.notifyContentIsReady();
window.HYPE_loadedWidget = true;
document.getElementById("1024_hype_container").style["background-image"] = "none";
}
return true;
}
if("HYPE_eventListeners" in window === false) {
window.HYPE_eventListeners = Array();
}
window.HYPE_eventListeners.push({"type":"HypeSceneLoad", "callback":widgetIsReady});
</script>
<!-- copy these lines to your document head: -->
<meta name="viewport" content="user-scalable=yes, width=1024" />
<!-- end copy -->
</head>
<body>
<!-- copy these lines to your document: -->
<div id="1024_hype_container" class="HYPE_document" style="margin:auto;position:relative;width:1024px;height:768px;overflow:hidden;">
<script type="text/javascript" charset="utf-8" src="1024.wdgt.hyperesources/1024_hype_generated_script.js?25945"></script>
</div>
<!-- end copy -->
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowNetworkAccess</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>1024</string>
<key>CFBundleIdentifier</key>
<string>com.tumult.hype.widget.1024</string>
<key>CFBundleName</key>
<string>1024</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>Height</key>
<string>768</string>
<key>MainHTML</key>
<string>index.html</string>
<key>Width</key>
<string>1024</string>
<key>IBNotifiesOnReady</key>
<true/>
<key>KFNotifiesOnReady</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment