User:Aldeka/common.js

// Add MediaWiki.org-link in the toolbox before the Print-link var link = mw.util.addPortletLink(    'p-tb',     '/',     'WP-LOIC',    't-mworg',     'WP Low Orbit Legislative Cannon',     'm',     '#t-print'     ); // Question: Did clusters of WP-based contacts affect congresspeople adopting/amending their SOPA positions?

// Let's find out.

var API_KEY = '6c6c718b830f4ec7854ff9e5ed67a86a';

var droppedSupport = {}; var joinedOpposition = {};

$(link).click(function(event) {   event.preventDefault;    $.getJSON('http://services.sunlightlabs.com/api/legislators.getList?apikey=' + API_KEY, function(data) { var $div = $(' ').dialog; $.each(data.response.legislators, function(i, item) {               $('').attr('href', item.website).text(item.lastname).appendTo($div);            }); }); });