Last active
December 15, 2015 17:58
-
-
Save gaeeyo/5299768 to your computer and use it in GitHub Desktop.
TvRockの自動検索予約のキーワード入力欄を input から textarea に変えて大きくする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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