阅读:6669回复:10
怎样复制超链接中的任意字段?像opera那样的
FF复制超链接地址比较麻烦,有时候只需要复制其中的一部分,选不了.
opera可以,op还有个比较人性化的是"粘贴并转到"功能比较好 |
|
1楼#
发布于:2009-10-23 09:58
要按住alt然后在靠近下划线的地方选择。
firefox这个操作真的是不太好,不小心就变成另存为了。 不知道能不能把那个另存为的快捷给屏蔽掉的。 |
|
2楼#
发布于:2009-10-23 09:58
第一个还好,没这困扰
第二个用Paste and Go即可实现 |
|
3楼#
发布于:2009-10-23 09:58
|
|
|
4楼#
发布于:2009-10-23 09:58
ferret:要按住alt然后在靠近下划线的地方选择。回到原帖 学习了。 查过网上,大多是有人觉得点了链接之后按 Alt-Tab 会触发保存命令而想屏蔽这个的,有兴趣的话看看这里或下面摘文: [quote="JTB World"]Here is the workaround that I found working after some research of the settings. Enter about:config in the address field. about:config is where all user preferences can be viewed and modified in Firefox. Locate browser.download.saveLinkAsFilenameTimeout and lower the value. I tried 100 milliseconds and have not seen any problems so far. If I run into problems I will try to set it a bit higher. Some URLs use Content-Disposition headers to tell browsers what to use for a filename when saving a file. This filename may not match the URL. When choosing “Save Link As...” from a link’s context menu, Mozilla must request the URL to find out the filename from a Content-Disposition header. Since this is not as fast as merely using the URL itself to generate a filename, Mozilla will time out after a short time waiting for the headers. This preference determines that timeout. Number of milliseconds to wait when retrieving the filename from Content-Disposition headers before resorting to the original URL’s filename. Default is 1000 (1 second). Hopefully there is a better way as this workaround might have side effects when downloading some URLs.[/quote] 由于选中链接任意文本需要鼠标位于链接上,所以上述办法对此无用;不过变通方法是选中需要的文字后向上或向下稍微移动(推荐向上),以不改变选中范围为前提,直到鼠标从“手型”指针变成普通指针(也就是“移出触发链接的区域”),然后松开 Alt 键就是了。 |
|
|
5楼#
发布于:2009-10-23 09:58
Cye3s:这个帖子里找找 如果论坛程序不支持在帖子内部搜索,建议就不要搞很长的帖子,要不然如何找呢? http://space.geocities.jp/alice0775/STO ... tKey.uc.js 作者的版本,不过松开Alt后还是不算Alt up,需要另一个键消除掉Alt down,例如再按一下Alt或者干脆按两下Ctrl_C,还算可以了,毕竟一个星期都用不到一次的操作。 // ==UserScript== // @name selectLinkTextWithAltKey.uc.js // @namespace http://space.geocities.yahoo.co.jp/gl/alice0775 // @description select Link Text With AltKey // @include main // @compatibility Firefox 2.0 ,3.0a7pre WinXP // @author Alice0775 // @version 2008/06/25 23:00 onclick属性のアンカーの場合にも対応 // @Note altキーを用いてリンクテキストを選択した際に, 保存ダイアログが開くのを抑止する // ==/UserScript== // @version 2007/08/03 15:00 var selectLinkTextWithAltKey = { init: function(){ gBrowser.mPanelContainer.addEventListener('click', this, true); }, handleEvent: function(event){ switch (event.type) { case "unload": gBrowser.mPanelContainer.removeEventListener('click', this, true); case "click": if (event.button == 0 && event.altKey && this.__getSelection()){ if (!this.isAnchorElement(event)) break; event.stopPropagation(); event.preventDefault(); break; } } }, isAnchorElement: function(event){ var target = event.originalTarget; while(target){ if (target instanceof HTMLAnchorElement || target instanceof HTMLImageElement || target instanceof HTMLAreaElement || target instanceof HTMLLinkElement) { return target; } target = target.parentNode; } return target; }, __getFocusedWindow: function(){ var focusedWindow = document.commandDispatcher.focusedWindow; if (!focusedWindow || focusedWindow == window) return window._content; else return focusedWindow; }, __getSelection: function(){ var targetWindow = this.__getFocusedWindow(); var sel = Components.lookupMethod(targetWindow, 'getSelection').call(targetWindow); return (sel && sel.toString() != '') ? sel : null; } } selectLinkTextWithAltKey.init(); window.addEventListener('unload', selectLinkTextWithAltKey, false); Tagged_by_kmc : alt key select link text userchromeJS |
|
|
6楼#
发布于:2009-10-23 09:58
咳,脚本作者主页被墙,国内是上不了滴,你在墙外没感觉
那个帖子我一般是翻页然后用FX的查找功能-_- 这个脚本作者好像改过,现在不用按两次Ctrl+C,在我这很好用 |
|
|
7楼#
发布于:2009-10-23 09:58
好用贴下代码咯
|
|
|
8楼#
发布于:2009-10-23 09:58
就你放的代码,哈哈
|
|
|
9楼#
发布于:2009-10-23 09:58
我觉得这样的话会不会跟easy dragtogo ++ 冲突呢?
因为我经常对一个链接拖动到后台新标签打开. 反正我是很少复制链接文字,要用的时候都是在文字上方一点或下方一点按住左键拖动来按ctrl+c |
|
10楼#
发布于:2009-10-23 09:58
我这里有个UC.JS脚本,是粘贴并转到的,并且放在第一个,快捷键为G
|
|
|