In function tb_show(caption, url, imageGroup) on line 39 of wp-includes/js/thickbox/thickbox.js, add the following line (bold red text represents the newly added code)
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
/// Code omitted. . .
TB_NextHTML = "";
TB_imageCount = "";
TB_FoundURL = false;
////// Open a new window to display the original image
TB_OpenNewHTML = "";
if(imageGroup){
/// Code omitted. . . < a href='#'>" thickboxL10n.next "";
} else {
TB_PrevCaption = TB_TempArray[TB_Counter].title;
TB_PrevURL = TB_TempArray[ TB_Counter].href;
TB_PrevHTML = "
" thickboxL10n.prev "";
}
////// Open a new window to display the original image
TB_OpenNewHTML = "
View original image";
} else {
TB_FoundURL = true;
TB_imageCount = thickboxL10n.image ' ' (TB_Counter 1) ' ' thickboxL10n.of ' ' (TB_TempArray.length);
////// Open a new window to display the original image
TB_OpenNewHTML = "
View original image";
}
}
}
}
/// Code omitted. . .
// Resizing large images - orginal by Christian Montoya edited by me.
/// Code omitted. . .
// End Resizing
TB_WIDTH = imageWidth 30;
TB_HEIGHT = imageHeight 60;
//jQuery("#TB_window").append("
" "
" caption "
" TB_imageCount TB_PrevHTML TB_NextHTML "
< ;div id='TB_closeWindow'>
");
/////// Show the next picture in a new window to view the original picture (add TB_OpenNewHTML)
jQuery("#TB_window").append("
" "
" caption "
" TB_imageCount TB_PrevHTML TB_NextHTML TB_OpenNewHTML "
");
jQuery("#TB_closeWindowButton").click(tb_remove);
if (!(TB_PrevHTML == = "")) {
/// Code omitted. . .
Effect:
After clicking "View Original Image", the original image will be displayed in a new browser window (Tab).