Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::open($save_path, $session_name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 205

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 220

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::read($id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 234

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::write($id, $dataStr) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 262

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::destroy($id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 368

Deprecated: Return type of MediaWiki\Session\PHPSessionHandler::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/PHPSessionHandler.php on line 389

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 70

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 80

Deprecated: Return type of Wikimedia\Rdbms\IResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php on line 75

Deprecated: Return type of Wikimedia\Rdbms\ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php on line 117

Deprecated: Return type of Wikimedia\Rdbms\ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php on line 90

Deprecated: Return type of MediaWiki\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 625

Deprecated: Return type of MediaWiki\Session\Session::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 631

Deprecated: Return type of MediaWiki\Session\Session::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 643

Deprecated: Return type of MediaWiki\Session\Session::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 637

Deprecated: Return type of MediaWiki\Session\Session::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 655

Deprecated: Return type of MediaWiki\Session\Session::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 649

Deprecated: Return type of MediaWiki\Session\Session::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 665

Deprecated: Return type of & MediaWiki\Session\Session::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 678

Deprecated: Return type of MediaWiki\Session\Session::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 688

Deprecated: Return type of MediaWiki\Session\Session::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/lfg/itchan.official.jp/public_html/wiki/includes/session/Session.php on line 693

Deprecated: Message implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/lfg/itchan.official.jp/public_html/wiki/includes/Message.php on line 159

Deprecated: RawMessage implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/lfg/itchan.official.jp/public_html/wiki/includes/RawMessage.php on line 34

Deprecated: Creation of dynamic property RequestContext::$recursion is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/includes/context/RequestContext.php on line 326

Deprecated: Creation of dynamic property Parser::$mPreprocessorClass is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/includes/parser/Parser.php on line 279

Deprecated: Creation of dynamic property Parser::$extCite is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/extensions/Cite/includes/Cite.php on line 1296

Deprecated: Creation of dynamic property Parser::$scribunto_engine is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/extensions/Scribunto/includes/common/Hooks.php on line 81

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/includes/parser/Preprocessor_DOM.php on line 845

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/Feed.php on line 294

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/Feed.php on line 300

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/WebResponse.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/lfg/itchan.official.jp/public_html/wiki/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php:24) in /home/lfg/itchan.official.jp/public_html/wiki/includes/WebResponse.php on line 46
http://itchan.official.jp/wiki/index.php?action=history&feed=atom&title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3AURL モジュール:URL - 版の履歴 2026-03-25T11:15:10Z このウィキのこのページに関する変更履歴 MediaWiki 1.31.1
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/includes/parser/Preprocessor_DOM.php on line 845

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /home/lfg/itchan.official.jp/public_html/wiki/includes/parser/Preprocessor_DOM.php on line 845
http://itchan.official.jp/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:URL&diff=603&oldid=prev いんふぉ™: 1版 2014-03-16T14:19:33Z <p>1版</p> <table class="diff diff-contentalign-left" data-mw="interface"> <tr class="diff-title" lang="ja"> <td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← 古い版</td> <td colspan="1" style="background-color: #fff; color: #222; text-align: center;">2014年3月16日 (日) 14:19時点における版</td> </tr><tr><td colspan="2" class="diff-notice" lang="ja"><div class="mw-diff-empty">(相違点なし)</div> </td></tr></table> いんふぉ™ http://itchan.official.jp/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:URL&diff=602&oldid=prev Fryed-peach: :en:Module:URL 2013年5月31日 (金) 10:58 より 2013-06-18T00:29:43Z <p><a href="/wiki/index.php?title=En:Module:URL&amp;action=edit&amp;redlink=1" class="new" title="En:Module:URL (存在しないページ)">en:Module:URL</a> 2013年5月31日 (金) 10:58 より</p> <p><b>新規ページ</b></p><div>--<br /> -- This module implements {{URL}}<br /> --<br /> -- See unit tests at [[Module:URL/tests]]<br /> <br /> local p = {}<br /> <br /> function trim(s)<br /> return (mw.ustring.gsub(s, &quot;^%s*(.-)%s*$&quot;, &quot;%1&quot;))<br /> end<br /> <br /> function safeUri(s)<br /> local success, uri = pcall(function()<br /> return mw.uri.new(s)<br /> end)<br /> if success then<br /> return uri<br /> end<br /> end<br /> <br /> function p._url(url, text)<br /> url = trim(url or &#039;&#039;)<br /> text = trim(text or &#039;&#039;)<br /> <br /> if url == &#039;&#039; then<br /> if text == &#039;&#039; then<br /> return mw.getCurrentFrame():expandTemplate{ title = &#039;tlx&#039;, args = { &#039;URL&#039;, &quot;1=&#039;&#039;example.com&#039;&#039;&quot;, &quot;2=&#039;&#039;リンクの表示名(省略可)&#039;&#039;&quot; } }<br /> else<br /> return text<br /> end<br /> end<br /> <br /> -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL.<br /> url = mw.ustring.gsub(url, &#039;%s&#039;, function(s) return mw.uri.encode(s, &#039;PATH&#039;) end)<br /> <br /> -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error<br /> url = mw.ustring.gsub(url, &#039;#$&#039;, &#039;&#039;)<br /> url = mw.ustring.gsub(url, &#039;%?$&#039;, &#039;&#039;)<br /> <br /> -- If it&#039;s an HTTP[S] URL without the double slash, fix it.<br /> url = mw.ustring.gsub(url, &#039;^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])&#039;, &#039;http%1://%3&#039;)<br /> <br /> local uri = safeUri(url)<br /> <br /> -- Handle URL&#039;s without a protocol and URL&#039;s that are protocol-relative, <br /> -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo<br /> if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= &#039;//&#039; then<br /> url = &#039;http://&#039; .. url<br /> uri = safeUri(url)<br /> end<br /> <br /> if text == &#039;&#039; then<br /> if uri then<br /> if uri.path == &#039;/&#039; then uri.path = &#039;&#039; end<br /> <br /> local port = &#039;&#039;<br /> if uri.port then port = &#039;:&#039; .. uri.port end<br /> <br /> text = mw.ustring.lower(uri.host or &#039;&#039;) .. port .. (uri.relativePath or &#039;&#039;)<br /> else -- URL is badly-formed, so just display whatever was passed in<br /> text = url<br /> end<br /> end<br /> <br /> return mw.ustring.format(&#039;&lt;span class=&quot;url&quot;&gt;[%s %s]&lt;/span&gt;&#039;, url, text)<br /> end<br /> <br /> function p.url(frame)<br /> local templateArgs = frame.args<br /> local url = templateArgs[1] or &#039;&#039;<br /> local text = templateArgs[2] or &#039;&#039;<br /> return p._url(url, text)<br /> end<br /> <br /> return p</div> Fryed-peach