{"id":12149,"date":"2023-11-12T07:00:33","date_gmt":"2023-11-11T22:00:33","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=12149"},"modified":"2023-11-10T23:06:09","modified_gmt":"2023-11-10T14:06:09","slug":"%e3%83%81%e3%83%a3%e3%83%83%e3%83%88%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%81%ae%e3%80%8c%e3%82%a8%e3%83%b3%e3%82%bf%e3%83%bc%e3%82%ad%e3%83%bc%e8%aa%a4%e9%80%81%e4%bf%a1%e3%80%8d%e3%82%92%e9%98%b2","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=12149","title":{"rendered":"\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u306e\u300c\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u8aa4\u9001\u4fe1\u300d\u3092\u9632\u3050\u300c\u9001\u4fe1\u30c0\u30e1\u3001\u30bc\u30c3\u30bf\u30a4\uff01\u300d\u62e1\u5f35\u3092\u3064\u304f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306e\u3088\u3046\u306a\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u306f\u7279\u306b\u305d\u3046\u3060\u3068\u601d\u3046\u3093\u3067\u3059\u304c\u3001\u591a\u6570\u3044\u3089\u3063\u3057\u3083\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3055\u3093\u305f\u3061\u3078\u306e\u9023\u7d61\u624b\u6bb5\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c<strong>\u305d\u308c\u305e\u308c\u9055\u3063\u305f\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9<\/strong>\u300d\u3092\u4f7f\u3063\u3066\u3044\u305f\u308a\u3059\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<ul>\n<li>Microsoft Teams<\/li>\n<li>Slack<\/li>\n<li>Chatwork<\/li>\n<li>\u30e1\u30fc\u30eb<\/li>\n<\/ul>\n<p>\u500b\u4eba\u7684\u306b\u306f\u3001\u591a\u6570\u306e\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3046\u3053\u3068\u81ea\u4f53\u306f\u554f\u984c\u306a\u3044\u3093\u3067\u3059\u3051\u3069\u3001\uff11\u500b\u3060\u3051\u3069\u3046\u3057\u3066\u3082\u300c<strong>\u3053\u308c\u3060\u3051\u306f\u3084\u3081\u3066\u2757<\/strong>\u300d\u3068\u601d\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">Enter \u30ad\u30fc\u3092\u62bc\u3057\u305f\u77ac\u9593\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3059\u308b<\/strong><\/p>\n<p>\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>\u7279\u306b\u65e5\u672c\u8a9e\u570f\u3067\u306f<code>Enter<\/code>\u30ad\u30fc\u304c\u5909\u63db\u306e\u78ba\u5b9a\u306b\u4f7f\u308f\u308c\u308b\u306e\u3067\u3001\u9593\u9055\u3063\u3066\u62bc\u3057\u3066\u3057\u307e\u3063\u3066\u300c<strong>\u3042\u2026\u9014\u4e2d\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3057\u3061\u3083\u3063\u305f\ud83d\ude2d<\/strong>\u300d\u3068\u306a\u308a\u3084\u3059\u3044\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3057\u304b\u3082\u3001<code>Ctrl + Enter<\/code>\u306e\u5834\u5408\u306f\u9001\u4fe1\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3082\u3042\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u300c\u3069\u306e\u30b5\u30a4\u30c8\u304c\u3069\u3046\u3060\u3063\u305f\u304b\u306a\u3093\u3066\u899a\u3048\u3066\u306a\u3044\u3088\u2026\u300d\u3068\u306a\u308a\u6238\u60d1\u3046\u3070\u304b\u308a\u3067\u3059\u3002<\/p>\n<p><strong>\u203b<\/strong> \u4eca\u8abf\u3079\u3066\u307f\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6df7\u5728\u3057\u3066\u3044\u307e\u3059\u3002\u30e2\u30a6\u30e4\u30e1\u30c6\u2026<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/studio-bouzu.net\/web-chattool-return-enter-key\/\" target=\"_blank\" rel=\"noopener\">Enter\u30ad\u30fc\u3067\u9001\u4fe1\u306a\u306e? \u6539\u884c\u306a\u306e? \u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u306e\u9055\u3044\u3092\u307e\u3068\u3081\u305f<\/a><\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u3082\u3046\u3044\u3063\u305d\u306e\u3053\u3068\u3001Enter\u95a2\u9023\u3067\u9001\u4fe1\u306f\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b<code>Google Chrome<\/code>\u306e\u72ec\u81ea\u62e1\u5f35\u300c<strong>\u9001\u4fe1\u30c0\u30e1\u3001\u30bc\u30c3\u30bf\u30a4\uff01<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8777 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/03\/no_15.png\" alt=\"\" width=\"338\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/03\/no_15.png 338w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/03\/no_15-300x284.png 300w\" sizes=\"auto, (max-width: 338px) 100vw, 338px\" \/>\u300c\u6539\u884c\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u3001<br \/>\nEnter \u3067\u9001\u4fe1\u3055\u308c\u305f\u3089<br \/>\n\u3053\u3046\u306a\u308a\u307e\u3059\u3088\u306d\ud83d\ude05\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Chrome Extension Manifest V3, JavaScript<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u3053\u306e\u62e1\u5f35\u3092\u4f5c\u308a\u59cb\u3081\u305f\u3068\u304d\u306f\u300c<strong>\u307e\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3051\u308b\u3063\u3057\u3087\uff01<\/strong>\u300d\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001<code>Teams<\/code>\u3084<code>Slack<\/code>\u304c<code>textarea<\/code>\u3067\u306f\u306a\u304f<code>contenteditable=\"true\"<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u95a2\u4fc2\u4e0a\u3001\u8907\u96d1\u306a\u69cb\u9020\u306b\u305b\u3056\u308b\u3092\u5f97\u307e\u305b\u3093\u3067\u3057\u305f\u2026\u3002<\/p>\n<p>\u307e\u305f\u3001\u305d\u308c\u305e\u308c\u306e\u30b5\u30a4\u30c8\u3067\u72ec\u81ea\u306e\u30b3\u30fc\u30c9\u304c\u52d5\u3044\u3066\u3044\u308b\u95a2\u4fc2\u4e0a\u3001\u4eca\u5f8c\u30b5\u30a4\u30c8\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u3042\u3063\u305f\u3089\u6a5f\u80fd\u3057\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u3082\u3042\u308b\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u8a18\u4e8b\u306e\u5185\u5bb9\u3068\u3057\u3066\u306f\u300c<strong>\u8aad\u307f\u3082\u306e<\/strong>\u300d\u7a0b\u5ea6\u3067\u8003\u3048\u3066\u3044\u305f\u3060\u3044\u305f\u65b9\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h1>\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u306b\u3064\u3044\u3066<\/h1>\n<p>\u4eca\u56de\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><strong>soushin-dame-zettai\/<\/strong>\r\n\u3000\u2514 <strong>images<\/strong>\r\n\u3000\u3000\u2514 <strong>icon_16.png<\/strong>\r\n\u3000\u3000\u2514 <strong>icon_32.png<\/strong>\r\n\u3000\u3000\u2514 <strong>icon_128.png<\/strong>\r\n\u3000\u2514 <strong>js<\/strong>\r\n\u3000\u3000\u2514 <strong>content-script.js<\/strong>\r\n<strong>manifest.json<\/strong>\r\n<\/pre>\n<p>\u3061\u306a\u307f\u306b\u30a2\u30a4\u30b3\u30f3\u306f<code>ChatGPT<\/code>\u306e<code>DALL\u00b7E 3<\/code>\u3067\u3064\u304f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12150\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/icon_128.png\" alt=\"\" width=\"128\" height=\"128\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/icon_128.png 128w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/icon_128-100x100.png 100w\" sizes=\"auto, (max-width: 128px) 100vw, 128px\" \/><\/p>\n<p>\u30db\u30f3\u30c8\u4fbf\u5229\u306b\u306a\u3063\u305f\u3082\u3093\u3067\u3059\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\uff08V3\uff09\u3092\u3064\u304f\u308b<\/h1>\n<p>\u4ee5\u524d\u3053\u306e\u30d6\u30ed\u30b0\u3067<code>Chrome<\/code>\u62e1\u5f35\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u3068\u304d\u306f\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e<code>V2<\/code>\u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u4e0a\u304c\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001\u305d\u308c\u307b\u3069\u5909\u66f4\u304c\u3042\u308b\u308f\u3051\u3067\u306f\u306a\u304b\u3063\u305f\u306e\u3067\u305d\u308c\u307b\u3069\u6238\u60d1\u3046\u3053\u3068\u3082\u306a\u304b\u3063\uff54\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3082\u3057<code>V2<\/code>\u304b\u3089<code>V3<\/code>\u3078\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304c\u53c2\u8003\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong> <a href=\"https:\/\/developer.chrome.com\/docs\/extensions\/migrating\/manifest\/\" target=\"_blank\" rel=\"noopener\">Update the manifest<\/a><\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306e\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>manifest.json<\/strong><\/p>\n<div>\n<pre><strong>{<\/strong>\r\n<strong>  \"manifest_version\": 3,<\/strong>\r\n<strong>  \"name\": \"\u9001\u4fe1\u30c0\u30e1\u3001\u30bc\u30c3\u30bf\u30a4\uff01\",<\/strong>\r\n<strong>  \"version\": \"1.0.0\",<\/strong>\r\n<strong>  \"description\": \"Enter \u30ad\u30fc\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\uff08\u5bfe\u5fdc\uff1a Microsoft Teams, Slack, Chatwork\uff09\",<\/strong>\r\n<strong>  \"icons\": {<\/strong>\r\n<strong>    \"16\": \"images\/icon_16.png\",<\/strong>\r\n<strong>    \"48\": \"images\/icon_48.png\",<\/strong>\r\n<strong>    \"128\": \"images\/icon_128.png\"<\/strong>\r\n<strong>  },<\/strong>\r\n<strong>  \"content_scripts\": [<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>      \"matches\": [<\/strong>\r\n<strong>        \"https:\/\/teams.microsoft.com\/*\",<\/strong>\r\n<strong>        \"https:\/\/app.slack.com\/*\",<\/strong>\r\n<strong>        \"https:\/\/www.chatwork.com\/*\"<\/strong>\r\n<strong>      ],<\/strong>\r\n<strong>      \"all_frames\": true,<\/strong>\r\n<strong>      \"js\": [\"js\/content-script.js\"],<\/strong>\r\n<strong>      \"run_at\": \"document_start\"<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>  ],<\/strong>\r\n<strong>  \"author\": \"\u4e5d\u4fdd\u3059\u3053\u3072\"<\/strong>\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<p>\u3053\u306e\u4e2d\u3067\u91cd\u8981\u306a\u306e\u304c\u3001\u6b21\u306e\u9805\u76ee\u3067\u3054\u7d39\u4ecb\u3059\u308b\u300c<strong>content scripts<\/strong>\u300d\u3067\u3059\u3002<\/p>\n<p>\u7c21\u5358\u306b\u8a00\u3046\u3068\u3001\u300c\u3053\u306e\u30b5\u30a4\u30c8\u306e\u5834\u5408\u306f\u3001\u72ec\u81ea\u306e<code>JavaScript<\/code>\u3092\u633f\u5165\u3057\u3066\u306d\u300d\u3068\u3044\u3046\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4eca\u56de\u306e\u5185\u5bb9\u3068\u3057\u3066\u306f\u300c<strong>\u4ee5\u4e0b\u306b\u8a72\u5f53\u3059\u308b\u30b5\u30a4\u30c8\u306e\u5834\u5408\u306f\u3001<code>js\/content-script.js<\/code>\u3092\u5b9f\u884c\u3057\u3066\u306d<\/strong>\uff08\u30cb\u30c3\u30b3\u30ea\uff09\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>https:\/\/teams.microsoft.com\/*<\/li>\n<li>https:\/\/app.slack.com\/*<\/li>\n<li>https:\/\/www.chatwork.com\/*<\/li>\n<\/ul>\n<h1>Content Scripts \u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6b21\u306b\u30e1\u30a4\u30f3\u306e<code>Content Scripts<\/code>\u3067\u3059\u3002<\/p>\n<p>\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>js\/content-script.js<\/strong><\/p>\n<div>\n<pre><strong>\/\/ \u5b9a\u6570<\/strong>\r\n<strong>const BACKGROUND_COLOR = '#d1ffd5';<\/strong>\r\n<strong>const TEXT_COLOR = '#000';<\/strong>\r\n\r\n<strong>\/\/ \u30d8\u30eb\u30d1\u30fc\u95a2\u6570<\/strong>\r\n<strong>const dd = console.log; \/\/ for TEST<\/strong>\r\n<strong>const isCombinationKey = e =&gt; { \/\/ \u7d44\u307f\u5408\u308f\u305b\u30ad\u30fc\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u304b<\/strong>\r\n\r\n<strong>    return e.ctrlKey || e.shiftKey || e.altKey;<\/strong>\r\n\r\n<strong>};<\/strong>\r\n\r\n<strong>\/\/ Teams<\/strong>\r\n<strong>const initTeams = () =&gt; {<\/strong>\r\n\r\n<strong>    window.addEventListener('load', () =&gt; {<\/strong>\r\n\r\n<strong>        setTimeout(() =&gt; {<\/strong>\r\n\r\n<strong>            setTeamsEvents();<\/strong>\r\n\r\n<strong>        }, 3000); \/\/ Teams \u306f\u9045\u3044\u306e\u3067 3 \u79d2\u5f85\u3064<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n<strong>const setTeamsEvents = () =&gt; {<\/strong>\r\n\r\n<strong>    const elements = document.querySelectorAll('[contenteditable=\"true\"]');<\/strong>\r\n\r\n<strong>    [].forEach.call(elements, el =&gt; {<\/strong>\r\n\r\n<strong>        el.style.backgroundColor = BACKGROUND_COLOR;<\/strong>\r\n<strong>        el.style.color = TEXT_COLOR;<\/strong>\r\n<strong>        el.addEventListener('keydown', e =&gt; {<\/strong>\r\n\r\n<strong>            if (e.key === 'Enter') {<\/strong>\r\n\r\n<strong>                if(! e.ctrlKey &amp;&amp; ! e.shiftKey &amp;&amp; ! e.altKey) {<\/strong>\r\n\r\n<strong>                    insertLineBreakOnTeams();<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>                e.stopPropagation();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }, true);<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n<strong>const insertLineBreakOnTeams = () =&gt; {<\/strong>\r\n\r\n<strong>    const selection = window.getSelection();<\/strong>\r\n\r\n<strong>    if (selection.rangeCount &gt; 0) {<\/strong>\r\n\r\n<strong>        const range = selection.getRangeAt(0);<\/strong>\r\n<strong>        range.deleteContents();<\/strong>\r\n\r\n<strong>        const br = document.createTextNode(\"\\n\");<\/strong>\r\n<strong>        range.insertNode(br);<\/strong>\r\n\r\n<strong>        const newRange = document.createRange();<\/strong>\r\n<strong>        newRange.setStartAfter(br);<\/strong>\r\n<strong>        newRange.setEndAfter(br);<\/strong>\r\n<strong>        selection.removeAllRanges();<\/strong>\r\n<strong>        selection.addRange(newRange);<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>};<\/strong>\r\n\r\n<strong>\/\/ Slack<\/strong>\r\n<strong>const initSlack = () =&gt; {<\/strong>\r\n\r\n<strong>    window.addEventListener('load', () =&gt; {<\/strong>\r\n\r\n<strong>        setTimeout(() =&gt; {<\/strong>\r\n\r\n<strong>            setSlackEvents();<\/strong>\r\n\r\n<strong>        }, 1000);<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n<strong>const setSlackEvents = () =&gt; {<\/strong>\r\n\r\n<strong>    const elements = document.querySelectorAll('[contenteditable=\"true\"]');<\/strong>\r\n\r\n<strong>    [].forEach.call(elements, el =&gt; {<\/strong>\r\n\r\n<strong>        el.style.backgroundColor = BACKGROUND_COLOR;<\/strong>\r\n<strong>        el.style.color = TEXT_COLOR;<\/strong>\r\n<strong>        el.addEventListener('keydown', e =&gt; {<\/strong>\r\n\r\n<strong>            if (e.key === 'Enter') {<\/strong>\r\n\r\n<strong>                e.stopPropagation();<\/strong>\r\n\r\n<strong>                \/\/ Enter + Shift \u304c\u9001\u4fe1\u306a\u306e\u3067\u5165\u529b\u5185\u5bb9\u306e\u6539\u5909\u306f\u4e0d\u8981<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }, true);<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n\r\n<strong>\/\/ Chatwork<\/strong>\r\n<strong>const initChatwork = () =&gt; {<\/strong>\r\n\r\n<strong>    window.addEventListener('load', () =&gt; {<\/strong>\r\n\r\n<strong>        setTimeout(() =&gt; {<\/strong>\r\n\r\n<strong>            setChatworkEvents();<\/strong>\r\n\r\n<strong>        }, 1000);<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n<strong>const setChatworkEvents = () =&gt; {<\/strong>\r\n\r\n<strong>    const elements = document.querySelectorAll('textarea');<\/strong>\r\n\r\n<strong>    [].forEach.call(elements, el =&gt; {<\/strong>\r\n\r\n<strong>        el.style.backgroundColor = BACKGROUND_COLOR;<\/strong>\r\n<strong>        el.style.color = TEXT_COLOR;<\/strong>\r\n<strong>        el.addEventListener('keydown', e =&gt; {<\/strong>\r\n\r\n<strong>            if (e.key === 'Enter') {<\/strong>\r\n\r\n<strong>                if(! isCombinationKey(e)) {<\/strong>\r\n\r\n<strong>                    e.preventDefault();<\/strong>\r\n<strong>                    insertLineBreakOnChatwork(e);<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>                e.stopPropagation();<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        });<\/strong>\r\n\r\n<strong>    });<\/strong>\r\n\r\n<strong>};<\/strong>\r\n<strong>const insertLineBreakOnChatwork = (e) =&gt; {<\/strong>\r\n\r\n<strong>    const el = e.target;<\/strong>\r\n<strong>    const currentText = el.value;<\/strong>\r\n<strong>    const selectionStart = el.selectionStart;<\/strong>\r\n<strong>    const selectionEnd = el.selectionEnd;<\/strong>\r\n<strong>    const lineBreak = \"\\n\";<\/strong>\r\n\r\n<strong>    const textBefore = currentText.substring(0, selectionStart);<\/strong>\r\n<strong>    const textAfter = currentText.substring(selectionEnd, currentText.length);<\/strong>\r\n\r\n<strong>    el.value = textBefore + lineBreak + textAfter;<\/strong>\r\n\r\n<strong>    const newPosition = selectionStart + lineBreak.length;<\/strong>\r\n<strong>    el.selectionStart = newPosition;<\/strong>\r\n<strong>    el.selectionEnd = newPosition;<\/strong>\r\n\r\n<strong>}<\/strong>\r\n\r\n<strong>\/\/ \u521d\u671f\u5316<\/strong>\r\n<strong>const init = () =&gt; {<\/strong>\r\n\r\n<strong>    const hostName = window.location.hostname;<\/strong>\r\n<strong>    const initFunctions = {<\/strong>\r\n<strong>        'teams.microsoft.com': initTeams,<\/strong>\r\n<strong>        'app.slack.com': initSlack,<\/strong>\r\n<strong>        'www.chatwork.com': initChatwork,<\/strong>\r\n<strong>    };<\/strong>\r\n<strong>    const initFunction = initFunctions[hostName];<\/strong>\r\n\r\n<strong>    if(typeof initFunction === 'function') {<\/strong>\r\n\r\n<strong>        initFunction(); \/\/ \u8a72\u5f53\u3059\u308b\u521d\u671f\u5316\u95a2\u6570\u3060\u3051\u5b9f\u884c<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>};<\/strong>\r\n\r\n<strong>init();<\/strong><\/pre>\n<p>\u898b\u3066\u3044\u305f\u3060\u304f\u3068\u5206\u304b\u308b\u3088\u3046\u306b\u30d0\u30cb\u30e9\uff08\u7d20\u306e<code>JavaScript<\/code>\uff09\u3067\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u305d\u308c\u305e\u308c\u30b5\u30a4\u30c8\u306b\u500b\u6027\u304c\u3042\u308b\u306e\u3067\u5fae\u5999\u306b\u9055\u3046\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u57fa\u672c\u7684\u306b\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u5165\u529b\u9805\u76ee\u306e\u300ckeydown\u300d\u30a4\u30d9\u30f3\u30c8\u3092\u3064\u304f\u308b<\/li>\n<li>\u305d\u306e\u4e2d\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\uff08+ Ctrl \u306a\u3069\uff09\u3067\u52dd\u624b\u306b\u9001\u4fe1\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>\u305f\u3060\u3057\u3001\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u304c\u62bc\u3055\u308c\u308b\u3068\u5165\u529b\u5185\u5bb9\u304c\u6539\u884c\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<\/ul>\n<p>\u203b \u3053\u306e\u3042\u305f\u308a\u306e\u517c\u306d\u5408\u3044\u304c\u96e3\u3057\u304b\u3063\u305f\u3067\u3059\u2026\ud83d\ude2d<\/p>\n<p>\u4eca\u56de\u306f\u77ed\u3044\u3067\u3059\u304c\u3001\u4f5c\u696d\u306f\u3053\u308c\u3067\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude04\u2728<\/p>\n<h1>\u62e1\u5f35\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\uff08\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u3042\u308b\uff09<code>Chrome<\/code>\u62e1\u5f35\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u4ee5\u524d\u516c\u958b\u3057\u305f\u8a18\u4e8b\u306e\u4e2d\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=295#i-3\" target=\"_blank\" rel=\"noopener\">\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b<\/a><\/p>\n<h1>GitHub \u3067\u516c\u958b\u3057\u307e\u3057\u305f<\/h1>\n<p><code>Google Chrome Web store<\/code>\u3067\u304d\u3061\u3093\u3068\u516c\u958b\u3057\u3066\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u3084\u306f\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u305d\u3046\u306a\u306e\u3067\u3001<code>GitHub<\/code>\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u3064\u304f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u304d\u305f\u3089\u8ab0\u304b\u304c\u3053\u308c\u3092\u4f7f\u3063\u3066\u4ed6\u306e\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u3082\u8ffd\u52a0\u3057\u3066\u5b8c\u6210\u3055\u305b\u3066\u304f\u308c\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\ud83d\ude04\ud83d\udc4d<\/p>\n<p><strong>\ud83d\udcdd \u8a72\u5f53\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/github.com\/SUKOHI\/soushin-dame-zettai\" target=\"_blank\" rel=\"noopener\">\u9001\u4fe1\u30c0\u30e1\u3001\u30bc\u30c3\u30bf\u30a4\uff01<\/a><\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u4eca\u56de\u306f\u8a18\u4e8b\u4e0a\u3067\u306e\u30c6\u30b9\u30c8\u3092\u7d39\u4ecb\u3057\u306b\u304f\u3044\u306e\u3067\u3001\u898b\u305f\u76ee\u3060\u3051\u306b\u3057\u307e\u3059\u3002\uff08\u8272\u304c\u5909\u308f\u3063\u3066\u307e\u3059\uff09<\/p>\n<p><strong>\uff08Teams\uff09<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12161\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_1.png\" alt=\"\" width=\"640\" height=\"70\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_1-300x33.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>\uff08slack\uff09<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12160\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_2.png\" alt=\"\" width=\"640\" height=\"85\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_2-300x40.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><strong>\uff08Chatwork\uff09<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12159\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/11\/soushin_dame_zettai_3.png\" alt=\"\" width=\"460\" height=\"50\" \/><\/p>\n<\/div>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b\u3001<code>Chrome<\/code>\u62e1\u5f35\u3092\u4f7f\u3048\u3070\u300c<strong>\u7279\u5b9a\u306e\u30b5\u30a4\u30c8\u306e\u307f<\/strong>\u300d\u306b\u4f55\u304b\u8ffd\u52a0\u3067\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30c6\u30fc\u30d6\u30eb\u3054\u3068\u306b CSV \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u3067\u304d\u308b\u30dc\u30bf\u30f3\u3092\u8ffd\u52a0\u3059\u308b<\/li>\n<li>\u753b\u50cf\u3092\u30ef\u30f3\u30af\u30ea\u30c3\u30af\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>\u53cd\u8ee2\u9078\u629e\u3057\u305f\u6587\u5b57\u3092PDF\u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/li>\n<li>\u6bce\u56de\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3081\u3093\u3069\u3046\u306a\u4f5c\u696d\u3092\u81ea\u52d5\u3067\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3059\u308b<\/li>\n<\/ul>\n<p>\u306a\u3069\u306a\u3069<\/p>\n<p>\u3082\u3057\u3053\u3046\u3044\u3063\u305f\u6a5f\u80fd\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3044\u3064\u3067\u3082\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3044\u3064\u3082\u3068\u306f\u5c11\u3057\u9055\u3063\u305f\u300c<strong>Chrome \u62e1\u5f35<\/strong>\u300d\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3057\u304b\u3001<code>Chrome extension<\/code>\u3092\u30a6\u30a7\u30d6\u30b9\u30c8\u30a2\u3067\u516c\u958b\u3059\u308b\u305f\u3081\u306b\uff15\u30c9\u30eb\u6255\u3063\u305f\u306f\u305a\u306a\u306e\u3067\u3001\u305b\u3063\u304b\u304f\u3060\u304b\u3089\u4ed6\u306e\u62e1\u5f35\u3082\u3064\u304f\u3063\u3066\u307f\u3088\u3046\u304b\u306a\u2026\u306a\u3093\u3066\u601d\u3046\u306e\u3067\u3059\u304c\u3084\u306f\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u304d\u306a\u304f\u306a\u308b\u306e\u3067\u3001\u4e8c\u306e\u8db3\u3092\u8e0f\u3093\u3067\u3057\u307e\u3044\u307e\u3059\u306d\u3002\uff08\u3082\u3061\u308d\u3093\u304a\u4ed5\u4e8b\u306a\u3089\u30ad\u30c3\u30c1\u30ea\u3084\u308a\u307e\u3059\u3088\ud83d\udc4d\uff09<\/p>\n<p>\u307e\u305f\u3001<code>Chrome<\/code>\u62e1\u5f35\u304c\u300c\u3046\u30fc\u3093\u2026\u300d\u306a\u90e8\u5206\u306f\u3001<strong>\u30b9\u30de\u30db\u7528\u306eChrome\u306b\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044<\/strong>\u3068\u3053\u308d\u3067\u3059\u3002\uff08\u304a\u305d\u3089\u304f\u30a2\u30c9\u30d6\u30ed\u30c3\u30ab\u30fc\u3092\u4f7f\u308f\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u305f\u3044\u3093\u3067\u3059\u304b\u306d\u2026\ud83e\udd14\uff09<\/p>\n<p>\u306a\u306e\u3067\u3001\u305d\u306e\u8fba\u304c\u6539\u5584\u3059\u308c\u3070\u62e1\u5f35\u306e\u4e16\u754c\u3082\u3082\u3063\u3068\u76db\u308a\u4e0a\u304c\u308b\u306f\u305a\u306a\u3093\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u305d\u3093\u306a\u30ab\u30f3\u30b8\u3067\u3001\u305c\u3072\u7686\u3055\u3093\u3082\u9762\u767d\u305d\u3046\u306a\u62e1\u5f35\u3092\u3064\u304f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11002 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/no_10.png\" alt=\"\" width=\"370\" height=\"290\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/no_10.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/no_10-300x235.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u5c11\u3057\u592a\u3063\u305f\u304b\u3089\u304b\u3001<br \/>\n\u65b0\u3057\u304f\u8cb7\u3063\u305f\u30ba\u30dc\u30f3\u304c\u30d4\u30c3\u30c1\u30d4\u30c1\u2026<br \/>\n\u30d3\u30fc\u30eb\u3063\u3066\u3046\u307e\u3044\u304b\u3089\u306a\u3041\ud83c\udf7b\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306e\u3088\u3046\u306a\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u306f\u7279\u306b\u305d\u3046\u3060\u3068\u601d\u3046\u3093\u3067\u3059\u304c\u3001\u591a\u6570\u3044\u3089\u3063\u3057\u3083\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3055\u3093\u305f\u3061\u3078\u306e\u9023\u7d61\u624b\u6bb5\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c\u305d\u308c\u305e\u308c\u9055\u3063\u305f\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u300d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=12149\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u30c1\u30e3\u30c3\u30c8\u30b5\u30fc\u30d3\u30b9\u306e\u300c\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u8aa4\u9001\u4fe1\u300d\u3092\u9632\u3050\u300c\u9001\u4fe1\u30c0\u30e1\u3001\u30bc\u30c3\u30bf\u30a4\uff01\u300d\u62e1\u5f35\u3092\u3064\u304f\u3063\u3066\u307f\u305f&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":12155,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-12149","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chrome"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12149"}],"version-history":[{"count":8,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12149\/revisions"}],"predecessor-version":[{"id":12167,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12149\/revisions\/12167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/12155"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}