您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
TweetDeckの投稿文にテキストを貼り付けた後、投稿文全体のダブルクォーテーションをアンエスケープする。
// ==UserScript== // @name TweetDeck Unescape Double Quotes after Pasting // @description TweetDeckの投稿文にテキストを貼り付けた後、投稿文全体のダブルクォーテーションをアンエスケープする。 // @namespace https://github.com/pingval/ // @version 0.00a // @author pingval // @match https://tweetdeck.twitter.com/* // @grant none // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js // @license CC0 // ==/UserScript== (function() { $(document).on('paste', 'textarea.js-compose-text', function(e) { const form = this; function unescape_DQ () { const from = form.value; // 改行を含まないなら何もしない if (!from.includes("\n")) { return; } // ダブルクォーテーションをアンエスケープ const to = from.replaceAll(/^"|"$/g, '').replaceAll(/""/g, '"'); form.value = to; if (from != to) { console.log(from + ' => '+ to); alert("投稿文のダブルクォーテーションをアンエスケープしました\n" + from + "\n↓\n"+ to); } } setTimeout(unescape_DQ, 100); }); })();