Skip to content

Instantly share code, notes, and snippets.

@oflow
Created August 17, 2012 08:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oflow/3377080 to your computer and use it in GitHub Desktop.
Save oflow/3377080 to your computer and use it in GitHub Desktop.
ドットインストールとかいうサイトの動画を自動再生
// ==UserScript==
// @name dotinstall auto play
// @description Youtube Player API使った(autoplay=1になってない)動画を自動再生のURLに置換する
// @include http://dotinstall.com/lessons/*
// ==/UserScript
/* 1クリックが面倒くさい… */
window.addEventListener('load', function() {
var player = document.getElementById('youtube_api_player');
if (player && player.src.indexOf('autoplay=1') == -1) player.src += '&autoplay=1';
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment