Skip to content

Instantly share code, notes, and snippets.

@brucemcpherson
Last active October 13, 2015 01:28
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 brucemcpherson/4117688 to your computer and use it in GitHub Desktop.
Save brucemcpherson/4117688 to your computer and use it in GitHub Desktop.
gaspublisher container
<html>
<head>
<title>"Gas publisher container - ramblings.mcpher.com"</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="https://raw.github.com/allmarkedup/jQuery-URL-Parser/master/purl.js" type="text/javascript"></script>
<script src="http://caja.appspot.com/prettify.js" type="text/javascript"></script>
<link href="http://caja.appspot.com/prettify.css" type="text/css" rel="stylesheet" />
<link href="css/gaspub.css" type="text/css" rel="stylesheet" />
</head>
<body>
<script type="text/javascript">// <![CDATA[
$(document).ready(function () {
var s="",p = $.url().param();
// must be js type - and set some defaults for testing
p['type']="js";
var o = {};
$.extend(o, {
url: "https://script.google.com/a/macros/mcpher.com/s/AKfycbzhzIDmgY9BNeBu87puxMVUlMkJ4UkD_Yvjdt5MhOxR1R6RG88/exec",
source: "script" },p );
// reconstruct arguments
s="";
for ( var k in o)
if (k != "url" && k && o.hasOwnProperty(k)) s += (s ? "&" : "?") + k + "=" +o[k];
// execute publisher
$.getScript(o.url + s, function () {
$('#myEmbedded').html(getMyEmbedded() );
prettyPrint();
} );
});
// ]]></script>
<div id="myEmbedded"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment