Imagus

Firefox拡張機能|2024-10-14

ブックマークレット|クリップボードで改行統一と行末半角スペース削除

javascript:(async()=>{let t=await navigator.clipboard.readText();t=t.replace(/(\r\n?|\n)/g,'\r\n').replace(/ +\r\n/g,'\r\n');await navigator.clipboard.writeText(t);})();

Firefoxのプロファイルを開く

【1の方法】検索窓に以下を入力
about:profiles

【2の方法】ハンバーガーメニュー→ヘルプ→他のトラブルシューティング情報〔ここにリフレッシュもある〕

Firefoxのプロファイルの場所

C:\Users\pure\AppData\Roaming\Mozilla\Firefox\Profiles

Firefoxのプロファイルの場所にある、登録済み拡張機能の種類が記録されている場所〔Windows〕

C:\Users\pure\AppData\Roaming\Mozilla\Firefox\Profiles\extensions.json

ブックマークレットのURLエンコードを外すOnigmoマクロ

S_ReplaceAll('[\r\n]+', '\n', 148);

S_ReplaceAll('%E3%83%A8%E3%83%89%E3%83%90%E3%82%B7' , 'ヨドバシ', 44);
S_ReplaceAll('%E9%80%9A%E8%B2%A9%E3%80%90%E5%85%A8%E5%93%81%E7%84%A1%E6%96%99%E9%85%8D%E9%81%94%E3%80%91' , '通販【全品無料配達】', 44);
S_ReplaceAll('%E2%96%A0' , '■', 44);
S_ReplaceAll('%20' , ' ', 44);
S_ReplaceAll('%E5%BC%95%E7%94%A8%E5%85%83' , '引用元', 24);
S_ReplaceAll('%E2%97%8F%E2%97%8F%E2%97%8F' , '●●●', 44);

//完了
//S_ReplaceAll('^(?!■).+$', '', 44);
S_ReplaceAll('^[\r\n]+', '', 44);
S_ReplaceAll('[\n]+', '\r\n', 44);
S_ReDraw(0);
S_SelectAll(0);
S_Copy(0);

ブックマークレット

Nitter URLをTwitter化する|ブックマークレット

javascript:(function() {var url = location.href;var replacedUrl = url.replace(/https:\/\/(.*?)\//gi, 'https://x.com/');location.href = replacedUrl;})();

Twitter URLをNitter化する|ブックマークレット

javascript:(function() {var url = location.href;var replacedUrl = url.replace(/https:\/\/(.*?)\//gi, 'https://nitter.poast.org/');location.href = replacedUrl;})();

Invidious URLをYouTube化する|ブックマークレット

javascript:(function() {var url = location.href;var replacedUrl = url.replace(/youchu\.be/gi, 'youtu.be');location.href = replacedUrl;})()
javascript:(function() {var url = location.href;var replacedUrl = url.replace(/youchu\.be/gi, 'youtu.be');var replacedUrl = replacedUrl.replace(/invidious\.poast\.org/gi, 'youtu.be');location.href = replacedUrl;})()

URLの取得The Newest Origin|ブックマークレット〔長いTwitterのURL|半角クォート〔"〕、半角スラッシュ〔/〕を文字実体参照にしないとURLが途中で途絶える〕

javascript:(function(){var t=document.title.normalize('NFC').replace(/ヨドバシ\.com - (.*?) 通販【全品無料配達】/g,'$1').replace(/ - YouTube/g,'').replace(/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFE00-\uFE0F\uFEFF]/g,'');var u=location.href.replace(/http:\/\/localhost:1313/g,'').replace(/https:\/\/benkyosukisuki.com/g,'').replace(/search\?.*\&q=/g,'search?&q=').replace(/\&stick=([^&|"]+)/g,'').replace(/\&ved=([^&|"]+)/g,'').replace(/\&biw=([^&|"]+)/g,'').replace(/\&bih=([^&|"]+)/g,'').replace(/\?frm_src=thumb_module/g,'').replace(/\&feature=youtu.be\&t=(\d+)m(\d+)s/g,'').replace(/time_continue=\d+\&/g,'').replace(/\#t=(\d+)m(\d+)s/g,'').replace(/\/\/www.youtube.com\/watch\?(.*?)v=(.{11})(.*)/g,'//youtu.be/$2?t=00m00s').replace(/\/\/www.amazon.co.jp\/.*\/dp\/(.{10}).*/g,'//www.amazon.co.jp/dp/$1').replace(/\/\/vimeo.com\/([\w/:%#\$&\?\(\)~\.=\+\-]+)/g,'//vimeo.com/$1#t=00m00s').replace(/moz\-extension:(.*?)(.{24})$/g,'https://www.youtube.com/channel/$2');prompt('HTML link','■<a href="'+u+'" target="_blank" rel="nofollow">'+t.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&apos;').replace(/</g,'&lt;').replace(/>/g,'&gt;')+'</a><br>')})();

引用ReModified〔2025-04-18引用〕ブックマークレット〔いちばん下が最も新しい〕

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var escaped_title=page_title.replace(/"/g, "&quot;");var selection=document.getSelection() + "";void(prompt('URL','<p><fieldset><dl class="quote"><dd><blockquote cite="' + location.href + '" title="'+ escaped_title +'"><p>' + selection.replace(/\n/g, "<br>") + '</p></blockquote></dd><dt class="cite">引用元: <a href="' + location.href + '" target="_blank" rel="nofollow">'+ escaped_title +'</a></dt></dl></fieldset></p>'))
javascript:(function(){var ctrl=/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFE00-\uFE0F\uFEFF]/g;var page_title=document.title.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ").replace(ctrl,"").normalize("NFC");var escaped_title=page_title.replace(/"/g,"&quot;");var selection='';var messageElement=document.querySelectorAll('div[data-peer-id], div[aria-label="Message"]');if(messageElement.length>0){selection=Array.from(messageElement).map(function(el){return el.innerText||el.textContent;}).join('\n');}else{selection=(document.getSelection()+"").replace(ctrl,"").normalize("NFC");}function getShadowText(node){var txt="";if(node.shadowRoot){txt+=getShadowText(node.shadowRoot);}node.childNodes.forEach(function(child){if(child.nodeType===3)txt+=child.textContent;else txt+=getShadowText(child);});return txt;}document.querySelectorAll("iframe").forEach(function(iframe){try{var body=iframe.contentDocument.body;if(body)selection+="\n"+body.innerText.replace(ctrl,"").normalize("NFC");}catch(e){}});void(prompt("URL",'<p><fieldset><dl class="quote"><dd><blockquote cite="'+location.href+'" title="'+escaped_title+'"><p>'+selection.replace(/\n/g,"<br>")+'</p></blockquote></dd><dt class="cite">引用元: <a href="'+location.href+'" target="_blank" rel="nofollow">'+escaped_title+'</a></dt></dl></fieldset></p>'));})();

引用Modified|ブックマークレット

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var escaped_title=page_title.replace(/"/g,"&quot;");var selection=(document.getSelection()+"").replace(/\n/g,"●●●");var content=('<p><fieldset><dl class="quote"><dd><blockquote cite="'+location.href+'" title="'+escaped_title+'"><p>'+selection.replace(/●●●/g,"<br>")+'</p></blockquote></dd><dt class="cite">引用元: <a href="'+location.href+'" target="_blank" rel="nofollow">'+escaped_title+'</a></dt></dl></fieldset></p>').replace(/\s+/g," ").replace(/ +<br \/>/g,"<br>");var textArea=document.createElement("textarea");textArea.value=content;document.body.appendChild(textArea);textArea.select();document.execCommand('copy');document.body.removeChild(textArea);void(prompt('',''))

引用Origin|ブックマークレット

javascript:var page_title=document.getElementsByTagName('title')[0].innerText.replace(/(^\s+)|(\s+$)|\n|\r/g,"").replace(/\s\s/g," ");var escaped_title=page_title.replace(/"/g, "&quot;");var selection=document.getSelection() + "";void(prompt('URL','<p><fieldset><dl class="quote"><dd><blockquote cite="' + location.href + '" title="'+ escaped_title +'"><p>' + selection.replace(/\n/g, "<br>") + '</p></blockquote></dd><dt class="cite">引用元: <a href="' + location.href + '" target="_blank" rel="nofollow">'+ escaped_title +'</a></dt></dl></fieldset></p>'))

AmazonのURLを短縮する|ブックマークレット

javascript:(function(){var a=document.getElementsByName("ASIN.0")[0]?document.getElementsByName("ASIN.0")[0].value:document.getElementsByName("ASIN")[0]?document.getElementsByName("ASIN")[0].value:"ASIN\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f";location.href="https://www.amazon.co.jp/dp/"+a})();

チェックボックスの反転|ブックマークレット

javascript:(function(d){ var chk = d.querySelectorAll("input[type='checkbox']"); for (let i = 0; i < chk.length; i++) { chk[i].checked = !chk[i].checked; } })(document);

チェックボックスの全切|ブックマークレット

javascript:(function (){var inputs = document.getElementsByTagName('input');for(var i=0; ; i++){for (var j=0; j < inputs.length; j ++) {var e = inputs[j];if (e.type == 'checkbox')e.checked = false;}if(i < window.frames.length){try {inputs = window.frames[i].document.getElementsByTagName('input');}catch(e){}}else{break;}}})();

チェックボックスの全入|ブックマークレット

javascript:(function (){var inputs = document.getElementsByTagName('input');for(var i=0; ; i++){for (var j=0; j < inputs.length; j ++) {var e = inputs[j];if (e.type == 'checkbox')e.checked = true;}if(i < window.frames.length){try {inputs = window.frames[i].document.getElementsByTagName('input');}catch(e){}}else{break;}}})();

Amazon→書籍横断|ブックマークレット

javascript:(function(){javascript:( function() { var title = document.getElementById(%22productTitle%22); var url = %22http://book.tsuhankensaku.com/hon/index.php?t=booksearch&q=%22 + title.innerText; document.location=url; })();})();

Amazon→ヨドバシ|ブックマークレット

javascript:(function(){var a = encodeURIComponent(document.getElementById('productTitle').textContent.trim());location='https://www.yodobashi.com/?word=' + a;})();

Amazon→メルカリ|ブックマークレット

javascript:(function(){var a = encodeURIComponent(document.getElementById('productTitle').textContent.trim());location='https://jp.mercari.com/search?keyword=' + a;})();

Firefox拡張機能|2024-10-14

AdNauseam

AdNauseam – Firefox (ja) 向け拡張機能を入手