// ==UserScript== // @name ZSMTurker's MTG Forum Image Video Spoilerizer (with labels mod) // @author ZSMTurker // @namespace mturkgrind // @namespace https://greasyfork.org/users/2291 // @description Spoilerize all images and videos in posts (except TO). // @require http://code.jquery.com/jquery-latest.min.js // @match http://www.mturkgrind.com/* // @match https://www.mturkgrind.com/* // @match http://www.mturkforum.com/* // @match https://www.mturkforum.com/* // @match http://mturkforum.com/* // @match https://mturkforum.com/* // @version 0.1c // @downloadURL none // ==/UserScript== // modified by clickhappier to change generic 'Spoiler' designations to specify 'Image Spoiler' or 'Video Spoiler', and added mturkforum urls $( document ).ready( function() { var postDivs = $(document).find('div[id*="post_message"]'); var imageArray = $(postDivs).find('img:not([title])').not( 'img[src*="turkopticon"]' ).not( 'img[src*="data.istrack.in"]' ); var videoArray = $(postDivs).find('iframe'); for (var i=0; i' + '
' +'Image Spoiler:' +'

'); imageArray.eq(i).after('
'); imageArray.eq(i).remove(); } for (var i=0; i' + '
' +'Video Spoiler:' +'