<commit_before>// srt.js
// <NAME> @qurihara

var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";

var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

function loadScript(filename, cb) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.src = filename;
  script.onload = cb;

  var firstScript = document.getElementsByTagName("script")[0];
  firstScript.parentNode.insertBefore(script, firstScript);
}

function indexedFunction(func) {
  if (func == null) {
    return null;
  }
  // if (index == -1 || func.length <= index) return null;
  if (index in func) {
    return func[index];
  }
  return null;
}

var index = "-1";
var doOnce = {};
var INTERVAL = 50;
var player;
var autoplay = 0;
var subUrl = "";
var saferMode = false;
var vars = {};

function onYouTubeIframeAPIReady() {
  var vid = "wJddRdcr3BE";
  var para = getUrlVars();
  if (para["v"]) {
    vid = para["v"];
  }
  if (para["autoplay"]) {
    autoplay = para["autoplay"];
  }
  if (para["safer"] && (para["safer"] === "true")) {
    saferMode = true;
    console.log("safer eval mode");
  }
  if (para["surl"]) {
    subUrl = para["surl"];
    console.log("subUrl:" + subUrl);
  }

  player = new YT.Player("player", {
    height: "390",
    width: "640",
    videoId: vid,
    // playerVars: { "cc_load_policy": 1},// , "autoplay": autoplay},
    events: {
      "onReady": onPlayerReady,
      "onStateChange": onPlayerStateChange
    }
  });
}

function confirmExtSub() {
  setTimeout(function(){
    alert(
      "公式配布されていないsrt.jsが指定されています。" +
      "任意のプログラムが実行されるリスクがあります。注意してください。\n" +
      "A third party srt.js was loaded.　It might be dangerous."
    );
    },500);
  return true;
}<commit_msg>added playsinline setting for HTML5 player on iOS.<commit_after>// srt.js
// <NAME> @qurihara

var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";

var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

function loadScript(filename, cb) {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.src = filename;
  script.onload = cb;

  var firstScript = document.getElementsByTagName("script")[0];
  firstScript.parentNode.insertBefore(script, firstScript);
}

function indexedFunction(func) {
  if (func == null) {
    return null;
  }
  // if (index == -1 || func.length <= index) return null;
  if (index in func) {
    return func[index];
  }
  return null;
}

var index = "-1";
var doOnce = {};
var INTERVAL = 50;
var player;
var autoplay = 0;
var subUrl = "";
var saferMode = false;
var vars = {};

function onYouTubeIframeAPIReady() {
  var vid = "wJddRdcr3BE";
  var para = getUrlVars();
  if (para["v"]) {
    vid = para["v"];
  }
  if (para["autoplay"]) {
    autoplay = para["autoplay"];
  }
  if (para["safer"] && (para["safer"] === "true")) {
    saferMode = true;
    console.log("safer eval mode");
  }
  if (para["surl"]) {
    subUrl = para["surl"];
    console.log("subUrl:" + subUrl);
  }

  player = new YT.Player("player", {
    height: "390",
    width: "640",
    videoId: vid,
    playerVars: {
			// "cc_load_policy": 1,
			// "autoplay": autoplay,
			"playsinline": 1
		},
    events: {
      "onReady": onPlayerReady,
      "onStateChange": onPlayerStateChange
    }
  });
}

function confirmExtSub() {
  setTimeout(function(){
    alert(
      "公式配布されていないsrt.jsが指定されています。" +
      "任意のプログラムが実行されるリスクがあります。注意してください。\n" +
      "A third party srt.js was loaded.　It might be dangerous."
    );
    },500);
  return true;
}
{'fraction_non_alphanumeric': 0.16662194794741078, 'fraction_numerical': 0.010195867990340756, 'mean_word_length': 3.4861612515042117, 'pattern_counts': {'":': 9, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3117078', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1359, 'n_words': 293}