Last active
July 27, 2017 12:06
-
-
Save fukumame/d9cbd992672fc030ee07a3a985a54120 to your computer and use it in GitHub Desktop.
チャットワークのTask本文の To/Re を無効化するボタンを追加するスクリプト
This file contains hidden or 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
| var buttonHTML = '<input type="button" value="TO/RE 無効化" />'; | |
| var replaceToText = function () { | |
| var taskContentTextArea = $('#_taskNameInput'); | |
| var orgText = taskContentTextArea.val(); | |
| var replacedText = orgText.replace(/\[To\:.*\]/g, 'TO '); | |
| replacedText = replacedText.replace(/\[返信.*\]/g, 'RE ') | |
| taskContentTextArea.val(replacedText); | |
| } | |
| $(buttonHTML).appendTo('div.addTaskContainer__submitContainer') | |
| .click(replaceToText); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment