Created
September 1, 2012 02:07
-
-
Save jdlrobson/3562738 to your computer and use it in GitHub Desktop.
wiki loves monuments widget for http://wikilovesmonuments.us/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function( $ ) { | |
$( '<link rel="stylesheet" >' ).attr( 'href', 'http://jonrobson.me.uk/wlm/p.css' ).appendTo( document.head ); | |
var $container = $( '<div>' ).css( { | |
height: $('#primary').height(), | |
width: 250, | |
position: 'relative', | |
display: 'block', | |
'float': 'right' | |
} ).insertAfter( '#secondary' ); | |
$.getScript( 'http://jonrobson.me.uk/wlm/polaroiderizer.js', function() { | |
polaroiderizer( $( '<div>' ).appendTo( $container ), | |
{ | |
iiurlwidth: '320px', | |
action: 'query', | |
gcmsort: 'timestamp', gcmdir: 'desc', | |
gcmlimit: 500, | |
gcmtitle: 'Category:Images_from_Wiki_Loves_Monuments_2012_in_the United States', | |
generator: 'categorymembers', format: 'json', prop: 'imageinfo', iiprop: 'url|user' | |
}, | |
{ | |
dropDelay: 3000, | |
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