// ==UserScript== // @name FF14コメント投稿拡張スクリプト // @namespace nohohon // @author nohohon // @description FF14のコメント投稿で表示サイズ変更、プレビュー機能を追加する // @include https://jp.finalfantasyxiv.com/lodestone/character/* // @include http://jp.finalfantasyxiv.com/lodestone/character/* // @version 1.4 // @grant none // ==/UserScript== (function(){ /** * コメント入力欄を縦にリサイズ出来るようにする */ function addCommentResize() { //コメント入力欄のスタイルを変更 var elemComment = document.getElementById('input_comment'); if(elemComment != null) { elemComment.setAttribute('style','resize:vertical;'); } } /** * プレビューボタンを追加する */ function addPreviewButton() { //送信ボタンの要素を取得 var elemSend = document.evaluate('//*[@id="commentbox_in"]/div/form/div[2]/input', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ); if(elemSend.snapshotLength){ //確認ボタンと送信ボタンを並べたHTMLを定義 var btnHtml = [ '
',elemPlayerName.innerHTML,'
', '',elemPlayerServer.innerHTML,'
', ' ', '
'), '