Skip to content

Instantly share code, notes, and snippets.

@fukumame
Last active July 27, 2017 12:06
Show Gist options
  • Select an option

  • Save fukumame/d9cbd992672fc030ee07a3a985a54120 to your computer and use it in GitHub Desktop.

Select an option

Save fukumame/d9cbd992672fc030ee07a3a985a54120 to your computer and use it in GitHub Desktop.
チャットワークのTask本文の To/Re を無効化するボタンを追加するスクリプト
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