什么补肝| 为什么会心慌| 女人山根低代表什么| 本子是什么意思| 多囊吃什么药| 禾加比读什么| 手指没有月牙是什么原因| 舌加氏念什么| 神阙穴在什么位置| 日前是什么意思| 为什么家里会有蜈蚣| 榧子是什么| 腹直肌是什么| 什么是情劫| 白芷长什么样图片| 舌头上有裂纹是什么原因| 心心相印是什么生肖| 荨麻疹吃什么药好的快| maggie是什么意思| 悸是什么意思| 什么是辛辣刺激性食物| 梭形是什么形状| mk是什么意思| 吃什么对血管好| 生长激素是什么| 水中毒是什么症状| 左顾右盼的顾是什么意思| 头上汗多是什么原因| 左氧氟沙星氯化钠注射作用是什么| 玫瑰糠疹什么原因引起的| hpv有什么症状吗| 子宫内膜异位症有什么症状表现| 属鼠的是什么命| 学兽医需要什么学历| 孕妇吃香蕉对胎儿有什么好处| 有黄痰是什么原因| 男性支原体感染什么症状| 女生胸部长什么样| 沙拉酱是用什么做的| 好记性不如烂笔头是什么意思| 贫血缺什么| 大便带血是什么原因| 指甲容易断裂是什么原因| 什么是埋线减肥| ecg什么意思| 天什么云什么| 方法是什么意思| 怕热爱出汗是什么原因| 打两个喷嚏代表什么| lg什么意思| 医保报销是什么意思| 牵牛花是什么颜色| 陌上人如玉是什么意思| 美宝莲属于什么档次| 五行缺什么怎么算| pa66是什么材料| 三界牌是什么| 月经推迟什么原因引起的| 维生素c阳性是什么意思| 益生菌什么时间吃最好| 分子量是什么| 颈部淋巴结肿大挂什么科| 廉洁奉公是什么意思| 脚心疼痛是什么原因引起的| 小腿酸什么原因| 林檎是什么意思| 两规是什么意思| 初级会计什么时候拿证| 氟康唑治什么妇科炎症| 包皮红肿用什么药| 亥时右眼跳是什么预兆| 免职和撤职有什么区别| 狙击蟹吃什么| 丹参长什么样子图片| 二尖瓣钙化是什么意思| 酒不醉人人自醉是什么意思| 女人吃什么疏肝理气| 火指什么生肖| 巴适是什么意思| 为什么会得白癜风| 彩宝是什么| 什么叫内分泌失调是什么意思| 绿色大便是什么原因| 胳膊肘疼痛是什么原因| 百合花是什么颜色的| 当你从我眼前慢慢走过是什么歌| 玉米糁是什么| 凤凰单枞是什么茶| 立夏什么时候| 命中注定是什么意思| 卒中患者什么意思| 梧桐树长什么样子| 6月19号是什么星座| 11.10是什么星座| 凝血酸是什么| 什么病才查凝血四项呢| 法西斯是什么意思啊| 潜阳是什么意思| 鸡爪烧什么好吃| xl是什么尺码| 脖子长小肉粒是什么原因| 狗懒子是什么意思| 人体消化道中最长的器官是什么| 阴道出血是什么原因| 窦性心动过速吃什么药| 皂角是什么| 1927年中国发生了什么| 什么杯子不能装水| 还替身是什么意思| 肚脐眼右边是什么器官| 手麻是什么病的预兆| 什么是根号| uu解脲脲原体阳性是什么意思| 肚子疼是为什么| 什么地眨眼| 粘粉是什么粉| 可可粉是什么| 安全期是什么时候| 荷花什么季节开放| 02年的属什么| 蚯蚓用什么呼吸| tct是检查什么的| 化气行水是什么意思| 菊花和枸杞泡水喝有什么功效| 女性口苦是什么原因引起的| 检查肾挂什么科| 什么防晒霜效果最好| 长期手淫有什么危害| 肌酸激酶偏低说明什么| 鬼一般找什么人压床| 蛋白是什么东西| 人格的核心是什么| 4月20号是什么星座| pa什么意思| 根管治疗后要注意什么| 脑白质脱髓鞘吃什么药| 如如不动是什么意思| 268数字代表什么意思| 狗咬了不能吃什么| 打磨工为什么没人干| 女人脾胃虚弱吃什么好| 438是什么意思| 疝外科是治什么病的| 乙醇是什么| 乳铁蛋白是什么| 60年是什么婚| 社保基金是什么| 吃枸杞有什么好处| 决明子泡水喝有什么好处| 丝瓜可以炒什么| 什么原因会引起胎停| 什么东西能加不能减| 2.6号是什么星座| dep是什么意思| 喝白糖水有什么好处和坏处| 甲状腺用什么药| 症瘕病是什么病| 顺丰为什么这么快| 茉莉茶叶属于什么茶| 眼睑肿是什么原因| 做梦梦见鬼是什么预兆| 晚上睡觉盗汗是什么原因| 窒息什么意思| 怕热是什么原因| 九月十七是什么星座| 女性尿液发黄是什么原因| 什么食物胆固醇高| eland是什么牌子| lotus是什么车| 肌腱炎吃什么药| 头晕目眩是什么原因| 潘多拉属于什么档次| 为什么会有跳蚤| 八髎区疼是什么原因| 送女生什么礼物好| 过剩是什么意思| 属鼠的和什么属相不合| 总放屁是什么病的前兆| 手心红是什么原因| 内膜回声欠均匀是什么意思| 检查脂肪肝做什么检查| 你是我的楼兰是什么意思| 桥本甲状腺炎是什么意思| 黑木耳不能和什么一起吃| 2001年出生属什么| 什么天山| 阴道里面痒是什么原因| 世袭罔替是什么意思| 青霉素过敏不能吃什么药| 头发白缺什么| 什么地问填词语| 肝囊肿有什么症状表现| 嘴唇是紫色的是什么原因| 把子肉是什么肉| 青衣是什么意思| 放化疗期间吃什么好| 舌头苦是什么原因| 幽门螺旋杆菌吃什么药最好| 阿鼻地狱是什么意思| 吃蜂蜜不能吃什么食物| 拉烂屎是什么原因| 奇葩是什么意思| 什么 姿势 最深| 男生适合养什么小型犬| 欢五行属什么| 喉咙发炎吃什么药| 俄罗斯的货币叫什么| 阔绰什么意思| 爸爸是什么意思| 湿疹要注意什么| 什么属于轻微糖尿病| 肌腱炎有什么症状| 吃红苋菜有什么好处| 右边小腹疼是什么原因| 打狂犬疫苗不能吃什么食物| 冰妹是什么意思| 红油抄手是什么| 苹果和生姜煮水喝有什么功效| 未病是什么意思| 愚公移山是什么意思| 生殖细胞瘤是什么病| 长个子需要补充什么| 氨咖黄敏胶囊是什么药| 网球ad是什么意思| 3的倒数是什么| 肺结核吃什么食物好| 陕西八大怪是什么| 扶他是什么意思| 肾结石吃什么比较好| 伤口用什么消毒| 紫苏叶是什么| 丞相和宰相有什么区别| 夜间睡觉出汗是什么原因| 从从容容的意思是什么| 平胸是什么原因导致的怎样解决| 脑鸣吃什么药最有效| 排卵期为什么会出血| 什么是敏感肌| 做梦梦见兔子是什么意思| 逆来顺受什么意思| 儒家思想的核心是什么| 发烧应该挂什么科| 榴莲什么季节成熟| 中秋节吃什么| 手脚麻木是什么原因| 割痔疮后吃什么恢复快| 为什么没有广东大学| 2e是什么意思| 笑靥如花是什么意思| 男属兔和什么属相最配| 外阴白斑有什么症状| 站久了脚后跟疼是什么原因| 烤箱可以烤些什么东西| 鹦鹉吃什么食物| 病毒性疣是什么病| 上午8点是什么时辰| 得意忘形是什么意思| 离婚带什么证件才能办理| 超拔是什么意思| 阳虚吃什么中药调理| 为什么会胸闷| 心脏骤停是什么原因引起的| ser是什么氨基酸| 慢性阑尾炎吃什么消炎药| 百度Jump to content

网购身份证银行卡成黑色产业链 每套500-1300元

From Wikipedia, the free encyclopedia
Smart Linking
Previewing a disambiguation page
DescriptionHelps linking to the correct articles by letting you preview them while editing
Author(s)V111P
StatusBeta
UpdatedMay 2, 2014; 11 years ago (2025-08-07)
BrowsersAll browsers
SkinsAll skins
SourceSee below
By default most of the times only a single line of text will be shown
Expanded with the handle to the right of the display
Maybe you actually want to link to one of these articles
Disambiguation pages auto-expand the display
百度 农业行业组织农场主支持自由贸易也提出强烈批评。

Smart Linking is a tool for linking articles and previewing the linked pages while source-editing Wikipedia/MediaWiki articles. (The visual editor is not supported.) Using it helps prevent linking to the wrong articles, including to redirecting or disambiguation pages.

The WikEd gadget is supported only partially at this time - you have to select the link text (instead of just placing the cursor within it) and if an article with that name exists Smart Linking will display it, but won't fix redirects for you in the wiki code.

You can edit this page. If I don't like or understand something you wrote, I will correct it. ;)

How to use

[edit]

To use Smart Linking (after installing it), position the text cursor anywhere within or just after the second closing bracket of a link and press the Smart Linking button, or select an existing link (with or without its square brackets) or select unlinked text you want to make a link from, and press the Smart Linking button. (See the section Selecting and focusing wiki links - Examples below for a clearer explanation). Smart Linking's display with the linked article's contents (or just the title of the page in red, if there is no such page yet) will appear above the textarea (tables, images, and templates are removed from the articles).

You can learn how to use most of the features by hovering with the mouse pointer over the various icons and links and reading the tooltips. Some less obvious things you need to know are:

  • The links within Smart Linking's display can lead you to other articles, but keep in mind that visiting other articles will change the address of the link in the textarea where you last left the cursor before pressing the Smart Linking button. You can use the back link (<<) to get back to the article you want to link to.
  • You can resize the display to make it display more than a single line at a time in two ways:
    • temporarily - by double clicking anywhere within the display or by dragging the bottom edge of the display (The second way doesn't always work in Internet Explorer). This way of resizing hides part of the textarea under the display. Double clicking the display while it is temporarily expanded collapses it back and returns focus to the textarea.
    • semi-permanently (until you leave the page) - by dragging the resize handle on the right of the display. This method moves the textarea down.
  • You can set the size of the display by editing your common.js file. See Customizing below.
  • Sometimes after you click the Smart Linking button the keyboard focus is left within the display (For example after a redirect the focus in on the Back link to allow for an easy cancellation of the redirecting). You can press Esc or ` (grave accent) to return the focus to the textarea (Escape won't work in Google Chrome).
  • Keyboard navigation within the Smart Linking display is possible - use Tab, Shift+Tab, Enter. With Esc or ` you can return to the textarea. With ^ or Shift+Esc you can remove the Smart Linking's display, ! acts like double click (described above).
  • Internet Explorer - There are several problems that I noticed with (version 10 of) this browser:
    • Usually when you click a link you will notice the entire page flashing (scrolling to a different position and back again).
    • Sometimes you can't resize the display by dragging the bottom edge - the handle is not there (sometimes you can find it only at the right side of the display).
    • The menu at the bottom right () disappears
[edit]
The toolbar icon
The button used for the classic toolbar
  • (<<) - Back to the previous article
  • - Open the article in a new window/tab
  • - Edit the article/section in a new window/tab
  • - Scroll to the table of contents at the bottom. The same icon at the ToC means: Show/hide the section links.
  • - Scroll to the table of contents at the bottom, hide the section links from it
  • - Scroll back to the top
  • - Return the focus to the textarea
  • - Open a menu with several other icons
  • - Open this help page in a new window/tab
  • - Close the display
  • - Attention! (This image is not a button, it signals a non-existing page, a disambiguation page, or an error.)
[edit]

In the following cases a valid already-existing wiki link is focused (the caret is after the first opening square bracket and at the latest right after the second closing square bracket, the caret's position here is marked with a vertical bar): [|[Wikipedia]], [[|Wikipedia]], [[Wiki|pedia]], [[Wikipedia|]], [[Wikipedia]|], [[Wikipedia]]|.

In the following cases no valid link is selected or focused (the caret's position here is marked with a vertical bar):

  • Wikipedia| (the caret is not within a wiki link or right after a wiki link)
  • |[[Wikipedia]] (the caret is before the wiki link)
  • [[Wikipedia]] | (the caret is not right after the wiki link, there is an interval between them)
  • [[2 > 1]]| (invalid article title)

In the following cases a valid link is selected: [[Wikipedia]], [[Wikipedia]], [[Wikipedia]], [[Wikipedia]], [[Wikipedia]], [[Wikipedia]], [[Wikipedia]], [[Wikipedia]]. If you are using the gadget Navigation Popups, selecting wiki links with all four of the square brackets ([[Wikipedia]]) will cause Navigation Popups to load the article. You can disable this behavior by adding var popupOnEditSelection = false; to your common.js or equivalent file.

In the following cases the selected text will be turned into a wiki link: English Wikipedia,  English Wikipedia, English Wikipedia ,  English Wikipedia . The spaces around the text won't be included in the link, so it's not a problem if they are also selected.

In the following case, the selected text won't be turned into a wiki link: 2 > 1 (invalid article title).

Installation

[edit]

For the English Wikipedia, add this code to your common.js (or vecor.js, or monobook.js, whichever you are using) file:

if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) > -1 ) {
	importScript('User:V111P/js/smartLinkingLoader.js'); // [[User:V111P/js/smartLinkingLoader.js]]
}

The wiki link is there so that your common.js file appears in the "What links here" list of that page. This way we can see how many people have installed the script.

You should move all your JavaScript code that you need only when editing wiki pages before the last closing } in the code above. That way it won't get loaded and executed on every page.

In other Wikipedias

[edit]

To try Smart Linking in other Wikipedias, you can use the code below.

if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) > -1 ) {
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:V111P/js/smartLinkingLoader.js'
			+ '&action=raw&ctype=text/javascript');
}

However, Smart Linking won't be able to detect your other-meaning and main-article templates, so you're losing some important features. That's why you need to set up a configuration file and load it instead of directly loading smartLinkingLoader.js as above. See the template configuration file for more information, read all the comments there and don't hesitate to ask if you need help. Let me know if you set Smart Linking up for another Wikipedia, so I can mention it here.

Customizing

[edit]

To configure Smart Linking's display, in your common.js or equivalent file add these lines first:

$.extend(window.smartLinkingConfig = window.smartLinkingConfig || {}, {

});

Then you can set properties by inserting them between the first and the last line of that code. To set a property, use this as a template: propertyName: value, where propertyName is one of the property names listed below, and value is an appropriate value for that property. Values which are not numbers or the keywords true and false need to be enclosed in either single or double quotes, as you can see in the example. All these lines must end with a comma, except the last one, right before the closing }); line (where a comma will actually cause an error in very old versions of Internet Explorer).

Here is an example setting several properties:

$.extend(window.smartLinkingConfig = window.smartLinkingConfig || {}, {
	blurChar: '!',
	height: '3em',
	expandHeight: '20em',
	background: 'cyan',
	insertRelation: 'after'
});

Here is a list of the possible properties:

  • closeChar - a character which, when typed while the keyboard focus is on the display, causes the display to disappear and the keyboard focus to be returned to the textarea. The default is ` (grave accent).
  • expandCollapseChar - a character which, when typed while the keyboard focus is on the display, causes the display to expand if it is not already expanded, otherwise it collapses and return the keyboard focus to the textarea. The default is !
  • blurChar - a character which, when typed while the keyboard focus is on the display, causes the display to collapse and returns the keyboard focus to the textarea. The default is ^
  • height - the initial height of the display. Can be just a number (which means it's in pixels) or a string with a number and one of the CSS units. The default value is '1.4em'. If you set this, set also expandHeight to the same or a larger value.
  • minHeight - height in number of pixels (no CSS units allowed). You can't resize the display with the mouse to be shorter in height than that. The default is whatever value you give to height. If you set this, try to set it to less than or equal to the value you give to height. If you don't set this, you can't make the display shorter than its initial height.
  • expandHeight - the height to which the display will be expanded in certain cases, such as on double click or when opening a disambiguation page. Set this to greater than or equal to height. If you don't want the display to expand automatically on double click, or when clicking certain links in it, or on disambiguation pages, set expandHeight to the same value as height.
  • background - set the background with a CSS value (which can be a color or an image url). The default is '#fed'. An example value with an image: 'url(//upload.wikimedia.org/wikipedia/commons/0/0f/Wiki_background.jpg)'. The image needs to be very light in color, or the text won't be readable.
  • insertRelToSelector (advanced) - a jQuery selector for the element before, after or within which the display is to be inserted. The default is '#wpTextbox1' (the textarea).
  • insertRelation - one of 'before', 'after', 'prepend', 'append' with meanings as in jQuery (for example 'prepend' means insert as a first element of the element selected with insertDisplayRelToSelector). The default is 'before'. Try using 'after' without setting insertDisplayRelToSelector ('prepend' or 'append' don't make sense for a textarea and won't work though).
  • addButton - set this to false (without quotes) to disable adding the Smart Linking button to the toolbar. Then, to use Smart Linking, you'll need to have some other way to call mw.libs.smartLinkingLoader.smartLinking()
  • allPossibleOtherMeaningTemplates - set this to true (without quotes) to cause all templates which appear in the wiki code on a line by themselves near the top of the article or section to be considered other-meaning or main-article templates. This is only useful while testing to find templates which need to be included in the configuration file for that wiki.

For developers

[edit]

If you would like to experiment and improve Smart Linking, I am ready to explain any and all parts of it - just ask.

Smart Linking is using several main components:

  • smartLinking.js is the main file
  • wikiParserV.js is a collection of useful functions
  • msgDisplay.js is the script that deals with Smart Linking's display
  • addToolbarButtons.js is a short script which adds the toolbar button
  • smartLinkingLoader.js is a short script which loads addToolbarButton.js and adds the button. By loading this file, instead of directly smartLinking.js, the user doesn't have to download the entire program before actually pressing the Smart Linking button for the first time. Also, I control the caching of smartLinking.js within smartLinkingLoader.js. Without control, scripts are cached for 30 days I think, which is too long for a beta version of an application. Alternatively though, you could load smartLinking.js directly and then call window.smartLinking() any way you like (no button will be added to the toolbar).

If you are experimenting and make a change in one or more of the files msgDisplay.js, wikiParserV.js, or addToolbarButtons.js, you can test it by (1) setting the main object to undefined or null (e.g. for msgDisplay.js: mediaWiki.libs.msgDisplay = null;), (2) executing the code from that file in the JavaScript console of your browser, then (3) executing the code from smartLinking.js, and finally (4) pressing the Smart Linking toolbar button. You don't need step (3) if you haven't already clicked Smart Linking's toolbar button since opening the page for editing. If you make a change only in smartLinking.js, than just execute that script.

童子尿能治什么病 衙内是什么意思 经期吃芒果有什么影响 孩子高低肩有什么好办法纠正 紫外线过敏是什么症状
蜂蜜有什么功效和作用 oof是什么意思 1962属什么 管状腺瘤是什么病 戴银镯子变黑是什么原因
白牡丹是什么茶 肝硬化有什么症状表现 胃肠外科是看什么病的 舌头烧灼感是什么原因 人老放屁是什么原因
血压高吃什么食物好 食禄痣是什么意思 狮子座是什么时候 出国旅游需要什么手续和证件 杉字五行属什么
燊什么意思hcv7jop5ns2r.cn 男生肚子疼是什么原因hcv7jop6ns1r.cn 一个黑一个俊的右边念什么gysmod.com 风热感冒吃什么药hcv9jop4ns7r.cn 口是心非是什么生肖hcv7jop7ns2r.cn
今天股市为什么暴跌hcv7jop9ns5r.cn 乳腺点状钙化是什么意思hcv8jop1ns1r.cn 什么如什么什么hcv8jop8ns6r.cn 猫不能吃什么东西96micro.com 户别是什么weuuu.com
保家卫国是什么生肖fenrenren.com 屁多是什么情况hcv9jop4ns7r.cn 凹儿念什么hcv9jop4ns1r.cn 西红柿什么时候成熟hcv9jop5ns8r.cn 大嘴巴是什么意思hcv8jop9ns6r.cn
轻度脂肪肝什么意思hcv7jop5ns5r.cn 梦见自己生了个儿子是什么意思hcv8jop1ns9r.cn ojbk是什么意思hcv7jop9ns9r.cn cold是什么意思hcv8jop6ns6r.cn 子午相冲是什么生肖hcv9jop5ns2r.cn
百度