Web Analytics
Privacy Policy Cookie Policy Terms and Conditions Wikipedia:ツール/ナビゲーション・ポップアップ - Wikipedia

Wikipedia:ツール/ナビゲーション・ポップアップ

出典: フリー百科事典『ウィキペディア(Wikipedia)』

ナビゲーション・ポップアップはウィキペディアの内部リンクをマウス操作(マウスオーバーやドラッグ)することで、リンク先のページを表示して簡単な操作が行えるスクリプトです。

ナビゲーション・ポップアップ リンク(青い文字)にマウスを重ねると、その内容が表示される
拡大
ナビゲーション・ポップアップ リンク(青い文字)にマウスを重ねると、その内容が表示される

目次

[編集] 概要

[編集] 手順

1. アカウント登録・ログイン
ナビゲーション・ポップアップを導入(インストール)するには、アカウント登録していなければなりません。もし、取得していない場合は、ログインページで登録した上で、ログインしてください。
2. スクリプトの追加
次に{{subst:navpop}}を、貴方のサブページである/monobook.jsのページに投稿してください(他のスクリプトが、既にある場合には追加してください)。もしくは、{{subst:navpop}}の代わりに、以下の文章を入力しても構いません。
いづれかの方法により保存すると、以下の文章が表示されます。
// [[User:Lupin/popups.js]]

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
  • :もし、貴方が「MonoBook(デフォルト)」以外の外装(スキン)を使用している場合は、以下のリストから使用しているスキンのページに作成もしくは追記してください。
3. キャッシュの消去
保存後は、使用しているブラウザのキャッシュを消去してください(「オプション」の下部にある注意に書いてある方法でもキャッシュを消去できます)。
ブラウザのJavaScriptを禁止しない限り、ナビゲーション・ポップアップは機能します。スクリプトの導入は、コモンズやウィクショナリーなどでも同様の手順で使用できるようになります。
機能停止したい場合
このスクリプトを削除(アンイスントール)したい場合、導入した際に表示された上記の文章を削除した後、キャッシュも消去してください。

[編集] 外観デザインの変更

CSSのファイルはjavascriptと同様にユーザー毎に変更できます。上記の導入する際に解説した .js.css に置き換えるだけで可能になり(monobook.css)、javascriptと同様に別の外装を使用するなど名称が正確でないと機能しません。

以下の記述はフォントの設定を変え、背景をオレンジ色にします。あくまで例であって、このまま使用すると見栄えを悪化させてしまうかもしれません。

.navpopup { 
  background-color: #FFBE20  !important;
  font-family:      serif    !important;
  color:            #404     !important;
  font-size:        medium   !important;
}
  • Note: .cssもキャッシュ破棄は同様です。

[編集] オプション

ナビゲーション・ポップアップにはいくつかのオプションがあり、javascriptを編集(monobook.js)することでユーザーの好みに合わせることができます。

option = value;
オプション構成の表を参考に、optionvalue の設定を変更します。
  • Note: //の後ろは、次の行になるところまで反映されません。

[編集] 実例 1

貴方が管理者でインターネット環境に自信がないならば、javascriptを以下のように変更することで、「表示の簡素化」と「管理機能のリンク」も使用できるようになります。

// [[User:Lupin/popups.js]] - この行はこのまま隠してください。

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

simplePopups=true;
popupAdminLinks=true;

[編集] 実例 2

また、以下の設定を追加すると、popupDelayをデフォルトよりも0.3秒ほど遅くし、popupHideDelayを即座に消して、popupImagesを表示させなくなります。

// [[User:Lupin/popups.js]] - この行はこのまま隠してください。

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

popupDelay=0.8;
popupHideDelay=0;
popupImages=false; 


[編集] オプション構成

の列中、太字で記されているのは「デフォルトの値」です。何もオプションをいじらなければ太字の値が暗黙のうちに使用されているということです。

オプション構成
オプション名 解説
popupDelay 小数値
(デフォルトは0.5
ポップアップが現れる動作をするまでの秒数。
popupHideDelay 小数値
(デフォルトは0.5
マウスポインタを遠ざけてポップアップが消えるまでの秒数。
simplePopups true, false リンクだけ見れればいいとか、ポップアップが回線容量を食い過ぎだなどと思う場合、true に設定するとリンク先の文字や画像といったデータは表示されなくなり、リンクの一覧のみを表示します。
popupStructure 'original', 'fancy', 'fancy2', 'menus', 'shortmenus', 'lite', 'nostalgia' ポップアップの表示する構造。The 'original' setting, which is the default if simplePopups is true (or if your browser is known not to support menus), has all the navigation links in the popup itself; 'fancy' and fancy2 are variants of this. The 'menus' setting, which is the default if simplePopups is not true, puts the navigation links in popup menus which appear when you mouseover the links beside the popup title. 'shortmenus' is a less cluttered version of 'menus' with fewer links. Finally, 'nostalgia' is a simple menuless structure, while 'lite' is a very simple structure, with just the preview and no navigation links at all.

Note that to set this variable, you need to include the single quotes, e.g. popupStructure='fancy';.

popupActionsMenu true, false When using menus, you can either have the title link in the popup generating a menu (if this is set to false) or a separate "actions" menu (if this is set to true, the default).
popupImages true, false これを false にすると、画像を表示しなくなります。
popupSubpopups true, false これが true であればプレビューにリンクを生成します。
popupOnEditSelection true, false If this is true then popups are generated for selected wikilinks when editing.
popupAdminLinks true, false If this variable is set to true then links which administrators can use to block people, delete pages and protect or unprotect pages will appear in the popups.
popupShortcutKeys true, false If this variable is set to true then you can focus some of the links in the popups quickly by pressing keys. When you hover the mouse over a link with a shortcut, the shortcut key appears at the end of the popup hint. For example, in Firefox or Opera, to quickly edit an article in a new tab you can type 'e Control-Enter'. Pressing escape should hide the popup, too.
popupFixRedirs true, false If this variable is set to true then you can automatically "fix" links to redirect pages by clicking on the "Redirects" link. Note: you probably don't want to "fix" such links every time you come across them, and you definitely don't want to go on a hunt for them to "fix" them. See /About fixing redirects.
popupWatchRedirredPages true, false, null If this variable is set to true then fixed redirect pages will always be watched; if it's false, then they'll always be unwatched. If it's null, then the page will be watched or unwatched according to the settings in your user preferences.
popupRedirAutoClick 'wpSave', 'wpPreview', 'wpDiff' The button which is automatically pressed when fixing redirects.
popupRedlinkRemoval true, false If this variable is set to true then you can automatically remove links to non-existent pages (so-called "red links") by selecting "Remove this link".
popupFixDabs true, false If this variable is set to true then you can automatically "fix" links to disambiguation pages by clicking one of the links at the very bottom of the popup.
popupAllDabsStubs true, false If this variable is set to false then only pages that look like stubs or disambiguation pages in the article namespace are treated specially. (Setting this to true can lead to lots of false positives).
popupWatchDisambiggedPages true, false, null If this variable is set to true then fixed dab pages will always be watched; if it's false, then they'll always be unwatched. If it's null, then the page will be watched or unwatched according to the settings in your user preferences.
popupNavLinks true, false If this is true then navigation links are displayed. If false, then these are switched off.
popupLastEditLink true, false Whether the popup should contain a "lastEdit" link.
popupHistoricalLinks true, false When hovering over links to old revisions and diff links, extra links such as "editOld" are generated if this is true. Otherwise, you get the same links as when hovering over an ordinary link.
popupPreviews true, false If this is true and you haven't set simplePopups, then a preview of the first part of the article will appear. (Reports of pages for which this is done badly are most welcome). If false, then this is switched off.
popupSummaryData true, false If this is true summary data for the target page is displayed. If false, then this is switched off.
popupLastModified true, false If true then the age of the page is displayed in the summary data. This is the amount of time that has elapsed since the article was edited.
popupDiffDates true, false If true, the dates of the revisions being compared are shown when previewing diffs.
popupImageLinks true, false If true, pages linking to an image should appear in the preview. This currently does not work for commons images.
popupOnlyArticleLinks true, false If true, then popups are only generated for links in the article. Otherwise, many other links (such as Edit, Help) get popups too.
imagePopupsForImages true, false By default, preview images are loaded even when hovering over visible images. Setting this to false turns that off.
popupMaxWidth 整数値
(デフォルトは350
または false
The maximum width of the popup in pixels. Setting this to false means the popup will expand to accommodate its contents.
popupInitialWidth 整数値または false The initial width of the popup in pixels. Setting this to false means the popup will initially be the size needed to accommodate its initial contents.
popupEditCounterTool "kate", "interiot", "custom" The edit counter tool to use, chosen from Kate's tool, Interiot's tool or a custom url defined by popupEditCounterUrl.
popupEditCounterUrl "" The url for a custom edit counter. You can use replaceable parameters in this url: $1 will be replaced with the username, and $2 with the database name (for example, enwiki_p).
popupDragHandle false, 'popupTopLinks', ... The name of an element by which the popup can be dragged without holding the shift key. If false, then the popup can be dragged using the shift key instead.
popupAdjustDates true, false If true, then dates in history, diff and user contributions previews are adjusted according to the settings in your user preferences.
popupThumbAction "imagepage", "sizetoggle", "linkfull" This controls what happens when you click the image in a preview. "imagepage" takes you to the image page (and will generate a subpopup when you hover over the image), unless the popup is generated for the image page; "sizetoggle" means the image size is toggled on click, and "linkfull" means that the image links directly to the full size version.
Edit summaries
popupRevertSummary a string The edit summary used when reverting and not using a queried revert summary (see below). The first %s appearing in this string is replaced with the revision ID of the page being reverted to.
popupRevertSummaryPrompt true, false If true, you will be given the chance to change the default revert summary with each reversion.
popupQueriedRevertSummary a string The edit summary used when reverting and using the query interface to get information about the reversion. A $1, $2, $3 in the string are replaced with the revision ID, the timestamp and the editor corresponding to the revision being reverted to.
popupQueriedRevertToPreviousSummary a string The edit summary used when reverting using diff links such as those found on user contributions pages and using the query interface to get information about the reversion. A $1, $2, $3 in the string are replaced with the revision ID, the timestamp and the editor corresponding to the revision immediately after the revision being reverted to.
popupFixRedirsSummary a string The edit summary used when fixing redirects. The first %s appearing in this string is replaced with the redirect page, and the second %s is replaced with the target page.
popupFixDabsSummary a string The edit summary used when disambiguating links. The first %s appearing in this string is replaced with the disambiguation page, and the second %s is replaced with the target page.
popupRedlinkSummary a string The edit summary used when removing red links. The first %s appearing in this string is replaced with the red link name.
Preview options
popupHistoryPreviewLimit an integer, 25 Preview at most this many edits from the top of the page's history.
popupCategoryMembers true, false Whether or not to preview members of categories.
popupPreviewHistory true, false Whether or not to generate special previews for links to history pages.
popupContribsPreviewLimit an integer, 25 Preview at most this many user contributions.
popupPreviewKillTemplates true, false If true, templates referred to in an article are simply deleted from previews; otherwise, they're shown as raw wikitext.
popupPreviewRawTemplates true, false If true, template pages (that is, pages in the Template: namespace) are previewed entirely as raw wikitext; otherwise, an attempt is made to render them in the preview.
popupPreviewFirstParOnly true, false If true, previews are restricted to the first paragraph of the article.
popupMaxPreviewSentences an integer, 4 The maximum number of sentences to extract from something approximating the beginning of an article for the preview.
popupMaxPreviewCharacters an integer, 600 The maximum number of characters to extract from something approximating the beginning of an article for the preview.

その他にオプションは追加される可能性があり、設定項目の追加リクエストを受け付けています(en:ノート:Tools/Navigation popups)。

[編集] 更新と翻訳

英語版の翻訳文

編集協力

THIS WEB:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2006:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu