V2Cで分断されたURLを結合する

2023-08-02
日付や時刻は結合しないようにした

ReplaceStr.txtを活用するスレ Part10にあったURL結合が便利なんだけど、V2Cではフリーズしてるのかと思うぐらい重くなるので、誤爆回避などを犠牲にして高速に動くように書いた。


//▽分断された「http://」「https://」を結合する_V2C
<rx2>t[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?p[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?(s)?[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?:[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?/[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?/[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]?([\dA-Za-z])【TAB】tp$1://$2【TAB】msg

//▽分断されたURLを結合する_V2C
<rx2>tp(s?://(?>[!#%&\--;=?-Z_a-z~]+))(?>(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|(?:[\--9=?-Za-z]+)?&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])(?![a-z@]{0,10}\s?<br>)([!#%&\--;=?-Z_a-z~]+))(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?(?>[\s 〇×☆★○●◎◇◆□■△▲▽▼◯]+(?![a-z]+ ?@|&#?[0-9a-z]{2,6};|(?:[/0-9]\s)?[?htps]{0,8}://|[0-9]{1,4}[-/:][0-9]{1,2}[^0-9])([!#%&\--;=?-Z_a-z~]+))?)(?!(?!<br>)[^\s 〇×☆★○●◎◇◆□■△▲▽▼◯!#%&\--;=?-Z_a-z~])	tp$1$2$3$4$5$6$7$8$9 <font color=red>[URL結合]</font>	msg

//▽改行で分断されたURLを結合する_V2C
<rx2>(tps?://(?>[!#%&\--;=?-Z_a-z~]+))(?<!/|\.htm|\.html)(?: <font color=red>\[URL結合\]</font>)?\s*<br>\s*(?![-!_@]|&[a-z]{2,4};|[?htps]{0,5}:?//|[!#%&\--;=?-Z_a-z~]+\s(?!\s?<br>)|[-_.#0-9a-zA-Z]{0,50}(?:[\s ]*<br>|$))([!#%&\-.0-9=?-Z_a-z]+/[!#&\--9=?-Z_a-z~]*|[%#\-.0-9a-zA-Z]+(?!/))(?:\s*<br>|$)【TAB】$1$2 <font color=red>[改行URL結合]</font><br>【TAB】msg

  • 「https://」のhtは結合しない。(tps://部分さえあればリンク化されるし)
  • 無理に一つにまとめる必要もないので分けた。
  • V2C以外では試してません。
更新履歴
2023-08-02
日付や時刻は結合しないようにした
2020-07-26
「https://」部分といくつか修正
2017-08-10
公開

タブバーをブラウザ最下部に移動するやつ

2023-05-18
113に対応

最下部へ移動する

:root {
  --tab-min-height: 36px;
}
#main-window:not([inFullscreen]) #browser,
#main-window:not([inFullscreen]) #customization-container{
  margin-bottom: calc(var(--tab-min-height) + var(--tab-block-margin) + var(--tab-block-margin)) !important;
}
#TabsToolbar > .toolbar-items {
  width: 100vw !important;
}
.titlebar-spacer {
  width: 0 !important;
}
#TabsToolbar > .toolbar-items {
  display: unset !important;
  position: fixed !important;
  bottom: 0 !important;
  min-height: var(--tab-min-height) !important;
  padding: 0 !important;
  z-index: 1000000000 !important;
}
/*フルスクリーン時は隠しておく*/
#main-window[inFullscreen] #TabsToolbar > .toolbar-items {
  background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)) !important;
}
#main-window[inFullscreen] #TabsToolbar > .toolbar-items:not(:hover) {
  height: 1px !important;
  opacity: 0 !important;
}
更新履歴
2023-05-18
113に対応
2021-06-03
89に対応
2020-08-14
背景色
2020-08-07
公開

タブバーを下段に移動させる

2023-04-17
113

上から、タイトルバー、メニューバー、ツールバー、タブバーの順で常時表示させたい
それ以外は知らない

タブバーを下段に移動させる.css

:root {
  --menubar-height: 22px;
}
:root[inFullscreen]:not([macOSNativeFullscreen]) toolbar:not([fullscreentoolbar="true"]) {
  visibility: visible !important;
}
#titlebar {
  order: 2 !important;
}
#main-window:not([chromehidden="menubar toolbar location directories status extrachrome "]) #navigator-toolbox {
  padding-top: var(--menubar-height) !important;
}
/*フルスクリーン時コンテンツ領域に被る*/
#main-window:not([chromehidden="menubar toolbar location directories status extrachrome "]) #navigator-toolbox[inFullscreen][style*="margin-top:"] #toolbar-menubar {
  display: none !important;
}
#main-window:not([chromehidden="menubar toolbar location directories status extrachrome "]) #toolbar-menubar{
  position: absolute !important;
  display: flex !important;
  top: 0 !important;
  height: var(--menubar-height) !important;
  width: 100vw !important;
}

cssがまた駄目になった時用に

css書いたけどまたすぐ使えなくなりそうなのでuserChrome.jsで切り貼りしてみた。
多分色んな不具合あるだろうけど知らない。

document.getElementById("navigator-toolbox").appendChild(document.getElementById("TabsToolbar")); 
更新履歴
2023-04-17
113
2021-06-08
フルスクリーン時メニューバーが消えてた
2021-06-04
微修正
2021-05-05
公開

プロフィール

豆腐

最新記事

最新コメント

カテゴリ

月別アーカイブ