Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Disqus google gadget embed (note: haven't used this in a long while)
<?xml version="1.0" encoding="UTF-8"?>
<ModulePrefs title="Disqus embed" author="Stefan Sundin" width="640" height="390"></ModulePrefs>
<UserPref name="shortname" datatype="string" default_value="" />
<UserPref name="id" datatype="string" default_value="" />
<UserPref name="url" datatype="string" default_value="" />
<UserPref name="title" datatype="string" default_value="" />
<UserPref name="width" datatype="string" default_value="" />
<UserPref name="height" datatype="string" default_value="" />
<UserPref name="args" datatype="string" default_value="" />
<Content type="html">
<div id="disqus_thread"></div>
<script type="text/javascript">
var prefs = new gadgets.Prefs();
var disqus_shortname = prefs.getString("shortname");
var disqus_identifier = prefs.getString("id");
var disqus_url = prefs.getString("url");
var disqus_title = prefs.getString("title");
var dsq = document.createElement("script");
dsq.type = "text/javascript";
dsq.async = true;
dsq.src = "http://"+disqus_shortname+"";
(document.getElementsByTagName("head")[0] || document.body).appendChild(dsq);
/* Developer notes:
Example code (Google Project Hosting):
<wiki:gadget border="0" url="" up_shortname="altdrag" up_id="altdrag" up_url="" up_title="front page" width="100%" height="1000" />
<style type="text/css">
body {
margin-top: 40px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment