• Resolved hero12

    (@hero12)


    hi,
    I have the following in some posts, and I need to remove it when the user visits the pages…

    '); galOpenCheck = true; } this.timerGallery = setTimeout(function () { jQuery( ‘#waitLoader’ ).remove(); jQuery( ‘.galleryoverlayer’ ).show(); jQuery( ‘#closeBtnGalleryTw’ ).show(); jQuery( ‘.ad-back, .ad-forward’ ).show(); jQuery(“#galleryContainer”).width( 950 ); jQuery(“#galleryContainer”).height( ‘95%’ ); jQuery(“#gallery”).css({‘width':’580px’}) jQuery( ‘#boxLateraleAdv’ ).fadeIn( 500 ); jQuery(“#galleryContainer”).css( {‘z-index':’2000′,’position':’absolute’ } ); jQuery(“#gallery .ad-image-wrapper, #gallery .ad-controls”).show(); jQuery(document).scrollTop( jQuery(“[name=’twittergallerylink’]”).offset().top ); _gaq.push([‘_trackEvent’, ‘galleryOpen’, ‘Individual’]); }, 3000);	/*	}	*/ },function (){ if(this.timerGallery){ clearTimeout(this.timerGallery); jQuery( ‘#waitLoader’ ).remove();} }); jQuery(‘#galleryContainer, .ad-back, .ad-forward,.ad-thumb-list a,.twittergallerylink’).click(function (e){ if(galOpenCheck != true) { jQuery(‘#galleryContainer’).append(”); galOpenCheck = true; } jQuery( ‘#waitLoader’ ).remove() jQuery( ‘.galleryoverlayer’ ).show(); jQuery( ‘#closeBtnGalleryTw’ ).show(); jQuery( ‘.ad-back, .ad-forward’ ).show(); jQuery(“#galleryContainer”).width( 950 ); jQuery(“#galleryContainer”).height( ‘95%’ ); jQuery(“#gallery”).css({‘width':’580px’}) jQuery( ‘#boxLateraleAdv’ ).fadeIn( 500 ); jQuery(“#galleryContainer”).css( {‘z-index':’2000′,’position':’absolute’ } ); jQuery(“#gallery .ad-image-wrapper, #gallery .ad-controls”).show(); jQuery(document).scrollTop( jQuery(“[name=’twittergallerylink’]”).offset().top ); _gaq.push([‘_trackEvent’, ‘galleryOpen’, ‘Individual’]); }); jQuery(document).click(function (e) { var container = jQuery(‘#galleryContainer, #closeBtnGalleryTw,.twittergallerylink’); if ((!container.is(e.target) // if the target of the click isn’t the container… && container.has(e.target).length === 0) || jQuery(‘#closeBtnGalleryTw’).is(e.target)) // … nor a descendant of the container { jQuery( ‘#closeBtnGalleryTw’ ).hide(); jQuery( ‘#boxLateraleAdv’ ).fadeOut( 100, function() { var widthResizedContainer = jQuery(“#galleryContainer”).css({width:’auto’}).width(); jQuery(“#galleryContainer”).width(widthResizedContainer); jQuery(“#gallery,#galleryContainer”).css({‘width':’380px’}); jQuery(“#galleryContainer”).css({‘z-index':’auto’,’position':’relative’}) jQuery(“#gallery .ad-image-wrapper, #gallery .ad-controls”).hide(); }); jQuery( ‘.galleryoverlayer’ ).hide(); galOpenCheck = false; } }); /* jQuery(document).mouseup(function (e) { var container = jQuery(‘#galleryContainer’); if ((!container.is(e.target) // if the target of the click isn’t the container… && container.has(e.target).length === 0) || jQuery(‘#closeBtnGalleryTw’).is(e.target)) // … nor a descendant of the container { jQuery( ‘.galleryoverlayer’ ).hide(); jQuery( ‘#closeBtnGalleryTw’ ).hide(); jQuery( ‘#boxLateraleAdv’ ).fadeOut( 100, function() { var widthResizedContainer = jQuery(“#galleryContainer”).css({width:’auto’}).width(); jQuery(“#galleryContainer”).width(widthResizedContainer); jQuery(“#galleryContainer”).css({‘z-index':’auto’,’position':’relative’}) jQuery(“#gallery .ad-image-wrapper, #gallery .ad-controls”).hide(); }); } }); */ /* setTimeout(function() {galleries[0].addImage(“images/thumbs/t7.jpg”, “images/7.jpg”);}, 1000); setTimeout(function() {galleries[0].addImage(“images/thumbs/t8.jpg”, “images/8.jpg”);}, 2000); setTimeout(function() {galleries[0].addImage(“images/thumbs/t9.jpg”, “images/9.jpg”);}, 3000); setTimeout(function() {galleries[0].removeImage(1);}, 4000); */ jQuery(‘#switch-effect’).change( function() { galleries[0].settings.effect = jQuery(this).val(); return false; } ); jQuery(‘#toggle-slideshow’).click( function() { galleries[0].slideshow.toggle(); return false; } ); jQuery(‘#toggle-description’).click( function() { if(!galleries[0].settings.description_wrapper) { galleries[0].settings.description_wrapper = jQuery(‘#descriptions’); } else { galleries[0].settings.description_wrapper = false; } return false; } ); }); } });

    I tried this:

    '\);(.*)}\);

    but when I tick the Regex checkbox, WordPress returns blank page.

    Please help, thank you

    https://www.ads-software.com/plugins/real-time-find-and-replace/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter hero12

    (@hero12)

    indeed, with any kind of regex… even with a simple word

    or your regex option doesn’t work or is there something which does conflict when I enable the regex…but how to debug? thanks

    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    Regex rules need to start and end with a forward slash. This is typical with regular expressions.

    I would recommend starting with a very simple regex replace and once you have it working, start adding in wildcards and such. Regular expressions can be tricky!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘issue with a regex…’ is closed to new replies.