Wiki

Add buttons to your website to help your visitors vote using Kudocracy.















-


Try out your button, then copy and paste the code below into the HTML for your site.




javascript


// This is based on the canonical twitter method
// See https://dev.twitter.com/web/javascript/loading
// Two changes: http instead of https and local domain vs twitter.com
window.kudocracy = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    k = window.kudocracy || {};
  if (d.getElementById(id)) return;
  js = d.createElement(s);
  js.id = id;
  js.src = "http://platform.kudocracy.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);
  k.r = [];
  k.ready = function(f) {
    k.r.push(f);
  };
 
  return k;
}(document, "script", "kudocracy-wjs"));