Skip to content

Instantly share code, notes, and snippets.

@jdlrobson
Created September 1, 2012 23:45
Show Gist options
  • Save jdlrobson/3591451 to your computer and use it in GitHub Desktop.
Save jdlrobson/3591451 to your computer and use it in GitHub Desktop.
( function( $ ) {
$('<div id="wlm-stream-widget" style="position:relative;display:block;float:right;width:250px;height:500px;display:block;"></div>').appendTo( '#secondary' );
$( '<link rel="stylesheet" >' ).attr( 'href', 'http://jonrobson.me.uk/wlm/p.css' ).appendTo( document.head );
$.getScript( 'http://jonrobson.me.uk/wlm/polaroiderizer.js', function() {
polaroiderizer( $( '#wlm-stream-widget' ),
{
iiurlwidth: '320px',
action: 'query',
gcmsort: 'timestamp', gcmdir: 'desc',
gcmlimit: 500,
// SET THE CATEGORY TO PULL FROM HERE
gcmtitle: 'Category:Images_from_Wiki_Loves_Monuments_2012_in_the United States',
generator: 'categorymembers', format: 'json', prop: 'imageinfo', iiprop: 'url|user'
},
{
dropDelay: 3000,
// CSS PROPERTIES TO ANIMATE ON
dropAnimation: { opacity: 1, rotate: 40 },
fadeDuration: 1000,
dropDuration: 10000,
source: 'commons',
rotationRange: 30,
columns: 'auto',
pollInterval: 1000 * 60 * 10 // every 10 minutes look for more
}
);
} );
} ( jQuery ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment