SHARE
TWEET

wewlad

a guest Jul 16th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).on('ready', function() {
  2.     var flag_previews = function() {
  3.         if (!$('.flag_preview').length) $('[name=user_flag]').after('<img class="flag_preview">');
  4.         if (!$(this).val()) {
  5.             return $('.flag_preview').remove();
  6.         }
  7.  
  8.         $('.flag_preview').attr('src', configRoot + "static/flags/" + "/" + $(this).val() + '.png');
  9.     }
  10.  
  11.     $('[name=user_flag]').on('change', flag_previews);
  12.     $(window).on('quick-reply', function(){$('[name=user_flag]').on('change', flag_previews)});
  13. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top