<commit_before>// Variable declarations
var $shareLinkModal = $('#share-link-modal');
var $toggleHeight = $(".toggle-height");
var $scrollableContent = $window = $(window);
var $imageList = $body = $('body');
var $navbarToggle = $(".navbar-toggle");
var $navbar = $("#navbar");
var $topNav = $(".navbar.navbar-default");
var $loadingSpinner = $(".loading-spinner");

// Page setup
$scrollableContent.focus();
$navbarToggle.on('blur', function() { $navbar.collapse('hide'); });
$shareLinkModal.on('hide.bs.modal', resetShareModal);
scrollingNav()
scrollRequests()
insertAd();

// Toggle height
var fitHeight = true;
if (localStorage && localStorage.getItem("fitHeight") === "false") {
  fitHeight = false;
}
function updateViewFitHeight() {
  $(".link-img").css("max-height", fitHeight ? "100%" : "");
  $(".img-container").css("height", fitHeight ? "70%" : "");
  $(".toggle-height").text((fitHeight ? "Expand" : "Shrink") + " Pictures");
}
function toggleFitToHeight() {
  fitHeight = !fitHeight;
  updateViewFitHeight();
  $toggleHeight.blur();
  localStorage.setItem("fitHeight", fitHeight);
}
updateViewFitHeight();
$toggleHeight.click(toggleFitToHeight);

// Social
var FB = null;
var fbShareBtnStrs = [
  '<div class="fb-share-button" data-href="http://www.pic.fish/',
  '" data-layout="button" data-size="large" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.pic.fish%2F',
  '&amp;src=sdkpreparse">Share</a></div>'
];
var twttrParts = [
  '<iframe class="pf-twitter" src="https://platform.twitter.com/widgets/tweet_button.html?size=l&url=http%3A%2F%2Fwww.pic.fish%2F',
  // terminal
  '&text=',
  // text joined with %20
  '&hashtags=PicFish%2C',
  // hashtag
  '" width="78" height="28" via="pic_fish" title="',
  // title
  '" style="border: 0; overflow: hidden;"> </iframe>'
]

// Share modal
$shareLinkModal.on('show.bs.modal', function (event) {<commit_msg>Prevent mobile iframing facebook<commit_after>// Variable declarations
var $shareLinkModal = $('#share-link-modal');
var $toggleHeight = $(".toggle-height");
var $scrollableContent = $window = $(window);
var $imageList = $body = $('body');
var $navbarToggle = $(".navbar-toggle");
var $navbar = $("#navbar");
var $topNav = $(".navbar.navbar-default");
var $loadingSpinner = $(".loading-spinner");

// Page setup
$scrollableContent.focus();
$navbarToggle.on('blur', function() { $navbar.collapse('hide'); });
$shareLinkModal.on('hide.bs.modal', resetShareModal);
scrollingNav()
scrollRequests()
insertAd();

// Toggle height
var fitHeight = true;
if (localStorage && localStorage.getItem("fitHeight") === "false") {
  fitHeight = false;
}
function updateViewFitHeight() {
  $(".link-img").css("max-height", fitHeight ? "100%" : "");
  $(".img-container").css("height", fitHeight ? "70%" : "");
  $(".toggle-height").text((fitHeight ? "Expand" : "Shrink") + " Pictures");
}
function toggleFitToHeight() {
  fitHeight = !fitHeight;
  updateViewFitHeight();
  $toggleHeight.blur();
  localStorage.setItem("fitHeight", fitHeight);
}
updateViewFitHeight();
$toggleHeight.click(toggleFitToHeight);

// Social
var FB = null;
var fbShareBtnStrs = [
  '<div class="fb-share-button" data-href="http://www.pic.fish/',
  '" data-layout="button" data-size="large" data-mobile-iframe="false"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.pic.fish%2F',
  '&amp;src=sdkpreparse">Share</a></div>'
];

var twttrParts = [
  '<iframe class="pf-twitter" src="https://platform.twitter.com/widgets/tweet_button.html?size=l&url=http%3A%2F%2Fwww.pic.fish%2F',
  // terminal
  '&text=',
  // text joined with %20
  '&hashtags=PicFish%2C',
  // hashtag
  '" width="78" height="28" via="pic_fish" title="',
  // title
  '" style="border: 0; overflow: hidden;"> </iframe>'
]

// Share modal
$shareLinkModal.on('show.bs.modal', function (event) {
{'fraction_non_alphanumeric': 0.21564160971905846, 'fraction_numerical': 0.010630220197418374, 'mean_word_length': 5.5107084019769355, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1427397', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1355, 'n_words': 237}