Skip to content

Instantly share code, notes, and snippets.

@gaeeyo
Last active December 15, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaeeyo/5299768 to your computer and use it in GitHub Desktop.
Save gaeeyo/5299768 to your computer and use it in GitHub Desktop.
TvRockの自動検索予約のキーワード入力欄を input から textarea に変えて大きくする
// ==UserScript==
// @name TvRock
// @namespace http://d.hatena.ne.jp/gae/
// @version 0.1
// @description TvRockのタイトルキーワードの入力欄を大きくします
// @match *:8969/*
// @copyright 2012+, You
// ==/UserScript==
var inputs = document.getElementsByTagName('input');
for (var j=0; j<inputs.length; j++) {
var input = inputs[j];
if (input.name == 'title' && input.form.name == 'kws') {
var ta = document.createElement('textarea');
ta.name = 'title';
ta.style.width = '100%';
ta.rows = 7;
ta.value = input.value;
ta.onchange = function () {
input.value = ta.value;
};
input.parentNode.insertBefore(ta, input);
input.style.display = 'none';
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment