# nlフィルタ定義(文字コード判定用なのでこの行は削除しないこと)

#-----------------------------------------------------------------------------------------
[Replace]
Name = ポップアップリンク置換(video.array & getthumbinfo 1)
URL = (?:i\.nicovideo\.jp/v3/video\.array[^&]+\&nlFilter|ext\.nicovideo\.jp/api/getthumbinfo(?:/[^?]+\?nlFilter|\?[^&]+\&nlFilter))
Multi = TRUE
EachLine = TRUE
idGroup = !1
Match<
((?:sm|nm|so)\d++)(?!</(?:id|video_id|watch_url)|[^<]*</tag)
watch/(\d++)(?!</(?:id|watch_url)|[^<]*</tag)
>
Replace<
&lt;a class="watch" target="_top" href="/watch/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
&lt;a class="watch" target="_top" href="/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
>

#-----------------------------------------------------------------------------------------
[Replace]
Name = ポップアップリンク置換(video.array & getthumbinfo 2)
URL = (?:i\.nicovideo\.jp/v3/video\.array[^&]+\&nlFilter|ext\.nicovideo\.jp/api/getthumbinfo(?:/[^?]+\?nlFilter|\?[^&]+\&nlFilter))
Multi = TRUE
EachLine = TRUE
idGroup = 1
Match<
((?:sm|nm|so)\d++)(?!</(?:id|video_id|watch_url)|[^<]*</tag)
watch/(\d++)(?!</(?:id|watch_url)|[^<]*</tag)
>
Replace<
&lt;a class="watch" target="_top" href="/watch/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()" style="color:#<C00000$C08000>;"&gt;$0&lt;/a&gt;
&lt;a class="watch" target="_top" href="/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()" style="color:#<C00000$C08000>;"&gt;$0&lt;/a&gt;
>

#-----------------------------------------------------------------------------------------
[Replace]
Name = ポップアップリンク置換(video.array & getthumbinfo 3)
URL = (?:i\.nicovideo\.jp/v3/video\.array[^&]+\&nlFilter|ext\.nicovideo\.jp/api/getthumbinfo(?:/[^?]+\?nlFilter|\?[^&]+\&nlFilter))
Multi = TRUE
EachLine = TRUE
Match<
co\d++(?![^<]*</tag)
user/\d++(?![^<]*</tag)
(?<!playlist/)mylist/(?:\d++/)?+(\d++)(?![^<]*</tag)
(?:im|sg)\d++(?![^<]*</tag)
(?:user/illust|comic)/\d++(?![^<]*</tag)
(?<!"|&quot;|h)h?ttp(s?://(?:(?!&lt;)&?[-\w.:/%_~?=!#+;]++)+)(?!</(?:thumb|title|(?:watch|user_icon|ch_icon)_url)|[^<]*</tag)
>
Replace<
&lt;a class="watch" target="_top" href="http://com.nicovideo.jp/community/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
&lt;a class="watch" target="_top" href="/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
&lt;a class="watch" target="_top" href="/$0" onMouseOver="return popThumb2('mylist/$1', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
&lt;a class="watch" target="_top" href="http://seiga.nicovideo.jp/$0" onMouseOver="return popThumb2('$0', 0)" onMouseOut="return nd()"&gt;$0&lt;/a&gt;
&lt;a target="_top" href="http://seiga.nicovideo.jp/$0">$0&lt;/a&gt;
&lt;a target="_top" href="http$1" style="color:#666;">http$1&lt;/a&gt;
>

#-----------------------------------------------------------------------------------------
[Replace]
Name = ポップアップリンク置換(video.array & getthumbinfo 4)
URL = (?:i\.nicovideo\.jp/v3/video\.array[^&]+\&nlFilter|ext\.nicovideo\.jp/api/getthumbinfo(?:/[^?]+\?nlFilter|\?[^&]+\&nlFilter))
Multi = TRUE
EachLine = TRUE
Match<
(?<=&lt;a)(?= href=(?:"|&quot;)http://ch\.nicovideo\.jp/(?:channel/)?([^"&]+)(?:"|&quot;)&gt;)
>
Replace<
 onMouseOver="return popThumb2('channel/$1', 0)" onMouseOut="return nd()"
>
