lusijin
火狐狸
火狐狸
  • UID23356
  • 注册日期2008-03-22
  • 最后登录2013-09-27
  • 发帖数138
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:6669回复:10

怎样复制超链接中的任意字段?像opera那样的

楼主#
更多 发布于:2009-10-23 09:58
FF复制超链接地址比较麻烦,有时候只需要复制其中的一部分,选不了.
opera可以,op还有个比较人性化的是"粘贴并转到"功能比较好
ferret
千年狐狸
千年狐狸
  • UID21816
  • 注册日期2007-11-11
  • 最后登录2013-03-22
  • 发帖数1114
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2009-10-23 09:58
要按住alt然后在靠近下划线的地方选择。
firefox这个操作真的是不太好,不小心就变成另存为了。
不知道能不能把那个另存为的快捷给屏蔽掉的。
just4fun
千年狐狸
千年狐狸
  • UID30408
  • 注册日期2009-09-17
  • 最后登录2016-04-28
  • 发帖数1497
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度2点
2楼#
发布于:2009-10-23 09:58
第一个还好,没这困扰

第二个用Paste and Go即可实现
Cye3s
千年狐狸
千年狐狸
  • UID155
  • 注册日期2004-11-25
  • 最后登录2024-04-28
  • 发帖数1322
  • 经验95枚
  • 威望0点
  • 贡献值34点
  • 好评度14点
  • 社区居民
  • 忠实会员
3楼#
发布于:2009-10-23 09:58
这个帖子里找找
http://board.mozest.com/viewthread.php?tid=26773
有个selectLinkTextWithAltKey
我很懒...
hzhbest
千年狐狸
千年狐狸
  • UID22640
  • 注册日期2008-01-15
  • 最后登录2017-04-06
  • 发帖数1763
  • 经验476枚
  • 威望3点
  • 贡献值414点
  • 好评度89点
  • 社区居民
  • 忠实会员
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 键就是了。
kmc
kmc
管理员
管理员
  • UID165
  • 注册日期2004-11-25
  • 最后登录2022-09-22
  • 发帖数9186
  • 经验397枚
  • 威望1点
  • 贡献值124点
  • 好评度41点
  • 忠实会员
  • 终身成就
  • 社区居民
5楼#
发布于:2009-10-23 09:58
Cye3s:这个帖子里找找
http://board.mozest.com/viewthread.php?tid=26773
有个selectLinkTextWithAltKey
回到原帖


如果论坛程序不支持在帖子内部搜索,建议就不要搞很长的帖子,要不然如何找呢?

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
Waterfox Current和Firefox Nightly都用,逐渐走出XUL扩展依赖
Cye3s
千年狐狸
千年狐狸
  • UID155
  • 注册日期2004-11-25
  • 最后登录2024-04-28
  • 发帖数1322
  • 经验95枚
  • 威望0点
  • 贡献值34点
  • 好评度14点
  • 社区居民
  • 忠实会员
6楼#
发布于:2009-10-23 09:58
咳,脚本作者主页被墙,国内是上不了滴,你在墙外没感觉
那个帖子我一般是翻页然后用FX的查找功能-_-

这个脚本作者好像改过,现在不用按两次Ctrl+C,在我这很好用
我很懒...
kmc
kmc
管理员
管理员
  • UID165
  • 注册日期2004-11-25
  • 最后登录2022-09-22
  • 发帖数9186
  • 经验397枚
  • 威望1点
  • 贡献值124点
  • 好评度41点
  • 忠实会员
  • 终身成就
  • 社区居民
7楼#
发布于:2009-10-23 09:58
好用贴下代码咯
Waterfox Current和Firefox Nightly都用,逐渐走出XUL扩展依赖
Cye3s
千年狐狸
千年狐狸
  • UID155
  • 注册日期2004-11-25
  • 最后登录2024-04-28
  • 发帖数1322
  • 经验95枚
  • 威望0点
  • 贡献值34点
  • 好评度14点
  • 社区居民
  • 忠实会员
8楼#
发布于:2009-10-23 09:58
就你放的代码,哈哈
我很懒...
kidzgy
火狐狸
火狐狸
  • UID35190
  • 注册日期2011-02-03
  • 最后登录2024-03-28
  • 发帖数248
  • 经验196枚
  • 威望0点
  • 贡献值122点
  • 好评度17点
9楼#
发布于:2009-10-23 09:58
我觉得这样的话会不会跟easy dragtogo ++ 冲突呢?
因为我经常对一个链接拖动到后台新标签打开.
反正我是很少复制链接文字,要用的时候都是在文字上方一点或下方一点按住左键拖动来按ctrl+c
kidzgy
火狐狸
火狐狸
  • UID35190
  • 注册日期2011-02-03
  • 最后登录2024-03-28
  • 发帖数248
  • 经验196枚
  • 威望0点
  • 贡献值122点
  • 好评度17点
10楼#
发布于:2009-10-23 09:58
我这里有个UC.JS脚本,是粘贴并转到的,并且放在第一个,快捷键为G
附件名称/大小 下载次数 最后更新
paste_and_go_urlbar.uc.rar (1KB)  40 2011-04-23 21:30
游客

返回顶部