// ==UserScript== // @name ZSMTurker's MTG Forum Image Video Spoilerizer (with labels mod) // @description Spoilerize all images and videos in posts (except TO) on mturk-related forums: MTurkGrind, MTurkForum, and TurkerNation. // @version 1.1c // @author ZSMTurker + clickhappier // @namespace mturkgrind // @require http://code.jquery.com/jquery-latest.min.js // @match http://www.mturkgrind.com/* // @match http://mturkgrind.com/* // @match http://www.mturkforum.com/* // @match http://mturkforum.com/* // @match http://www.turkernation.com/* // @match http://turkernation.com/* // @grant GM_log // @downloadURL none // ==/UserScript== // v0.1c: modified by clickhappier to change generic 'Spoiler' designations to specify 'Image Spoiler' or 'Video Spoiler', and added mturkforum urls // v1.0c: updated (with help from Lowlife) to handle both Xenforo and vBulletin forums; plus, improved handling of images inside links. $( document ).ready( function() { // xenforo version var postDivsXF = $(document).find('div[class*="messageContent"]'); var imageArrayXF = $(postDivsXF).find('img:not([title])').not( 'img[src*="turkopticon"]' ).not( 'img[src*="data.istrack.in"]' ).not( 'img[src*="data/avatars"]' ); var videoArrayXF = $(postDivsXF).find('iframe'); for (var i=0; i' + '
' +'Image Spoiler:' +'

'); } else { imageArrayXF.eq(i).before('
' + '
' +'Image Spoiler:' +'

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