Skip to content

Instantly share code, notes, and snippets.

@mildfuzz
Created February 26, 2015 09:56
Show Gist options
  • Select an option

  • Save mildfuzz/660492b600b6119bffb3 to your computer and use it in GitHub Desktop.

Select an option

Save mildfuzz/660492b600b6119bffb3 to your computer and use it in GitHub Desktop.
dmk-container
<% include header %>
<% include alert %>
<div id="dmk-container-holder">
<h2>DMK Container</h2>
</div>
<script type="text/javascript">
var token = '<%= token %>',
var path = '<%= path %>';// http://localhost:8080/main.js || http://dmk.makespace.org/147862/main.js
var attr = {
containerId: 'dmk-container-holder',
save: function(UserDate){/*post*/},
update: function(UserDate) {/*put*/},
isAuth: function(){/*get return bool*/},
upload: function(){/*post*/}
}
require([path], function(App){
App.init(attr)
console.log(attr);
});
</script>
<% include footer %>
<script type="text/javascript">
/*Open Game Object, lifted as example of what */
var og = {
environment: "test",
exitGameUrl: "http://www.test.bbc.co.uk/guides/zds7fg8",
gameContainerId: "og-game-holder",
gameDir: "http://10.0.1.70:9000/js/App/Playback/",
gameUrl: "http://10.0.1.70:9000/js/App/Playback/main.js",
gid: "gpn8qqsb49",
goFullScreen: function (){},
isFullScreen: true,
resizeFrame: function ogResizeFrame(width, height)
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment