anchor.diff:  /*
     Usage example:
   
  -    <div class="hdo-issue-widget" height="500" width="20%" data-issue-id="fjerne-formueskatten">Laster sak...</div>
  +    <div class="hdo-issue-widget" height="500" width="20%" data-issue="161">Laster sak fra Holder de ord...</div>
  +
  +
       <script src="http://holderdeord.no/widgets"></script>
   */
   
   HDO.widgets = (function () {
  +  this.host = '<%= request.host %>';
     this.baseUrl = '<%= request.scheme %>://<%= request.host %>:<%= request.port %>/';
   
     function extractWidgetOptions(type, el) {
         var url;
  +
  +      function queryParamFor(key, value) {
  +        return key + '=' + encodeURIComponent(value);
  +      }
   
         function addIssueParams(el, url) {
           var issues = el.getAttribute('data-issue-ids');
  
positive.code:         url += '?'
  
          if (issues && issues.length)
            url += 'issues=' + encodeURIComponent(issues);
  
          if (count && count.length)
            url += 'count=' + encodeURIComponent(count);
  
          return url;
        }
  
negative.code:       } else if (type == "party") {
            url = baseUrl + "parties/" + el.getAttribute('data-party-id') + '/widget';
            url = addIssueParams(el, url);
        } else if (type == "topic") {
            url = baseUrl + "widgets/topic?" + queryParamFor('issues', el.getAttribute('data-issues')) + '&' + queryParamFor('promises', el.getAttribute('data-promises'))
        } else {
            throw new Error('invalid HDO widget type: ' + type);
        }
  