Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var script = document.createElement( 'script' );
- script.setAttribute( 'src', 'http://code.jquery.com/jquery-2.0.3.min.js' );
- script.setAttribute( 'type', 'text/javascript' );
- document.head.appendChild( script );
- var time = ( new Date ).getTime();
- var httpErrorHandler = function ( e ) {
- var element = e.target;
- var sprayFileName = $( element ).parent().find( 'a.contentno' ).attr( 'href' );
- $( document.body ).append( $( '<iframe>' ).attr( {'visibility': 'none', 'src': sprayFileName} ) );
- $( element ).attr( 'src', $( element ).attr( 'src' ) + '?' + time );
- };
- $( 'li.contentn' ).css( {'border': '1px solid black', 'list-style-position': 'inside'} );
- $( 'li.contentn' ).each( function ( index, element ) {
- var sprayFileName = $( element ).find( 'a.contentno' ).attr( 'href' ).match( /spray=(.*)&/ )[1];
- $( element ).prepend( $( '<img>' ).attr( 'src', 'http://spray.tf2.azelphur.com/sprays/' + sprayFileName + '.vtf.gif' ).error( httpErrorHandler ) );
- } );
Advertisement
Add Comment
Please, Sign In to add comment