複製 URL 的好工具:CopyURL+

CopyURL+ 是一個 firefox 的 extension。

最主要功能是可以讓你輕易地複製網頁的URL。這可能沒什麼,因為 Firefox 本身就有內建 “Copy Link Location” 的右鍵選單了。不過強大的是它的自訂功能,可以自訂到時候要 Copy 出來的格式 ,這使得我們可以輕易地製造出可供 blogging 時使用的 URL link (像 <a href=”http://blog.serv.idv.tw/” title=”終極邊疆BLOG” target=”_blank” >終極邊疆BLOG</a> ) 這種形式。

之前在 Jan’s Tech Blog: CopyURL+ for Firefox 裡有看到介紹,所以心裡有個印象,今天想用時當然就去翻了一下。 到 Firefox Extensions 翻了一下,很快就找到並下載,不過安裝重新啟動 Firefox 後,卻只有基本的 Copy URL + Title 功能,Extension 的地方也沒有 Option 可以自訂。不過 Jan 說可以自訂啊,所以又連上了作者網頁去看了一看:

原來要自己修改 user.js 才行 @@

所以呢,請你跟我這樣做: 😛

先找到 user.js 所在的目錄 ,位置如下:

  1. On Windows XP/2000, the path is usually %AppData%\Mozilla\Firefox\Profiles\default.xxx\, where xxx is a random string of 3 characters. Just browse to C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\ and the rest should be obvious.
  2. On Windows 95/98/Me, the path is usually C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\default.xxx\
  3. On Linux, the path is usually ~/.mozilla/firefox/default.xxx/
  4. On MacOS X, the path is usually ~/Library/Application Support/Firefox/Profiles/default.xxx/

P.S. 事實上,不一定是 default.xxx 也可能是 xxx.default

然後,看看有沒有 user.js,沒有? 沒關係,請自己用記事本開一個檔案叫 user.js。

最後,你可以參照 作者設定的語法把自訂的格式加入,或是參考作者提供的範例。

以我而言,下面的語法是在 blogging 時比較合適的:

user_pref(“copyurlplus.menus.1.copy”, “<a href=”%URL%” title=”%TITLE%” target=”_blank” >%TITLE%</a>”);
user_pref(“copyurlplus.menus.1.label”, “Copy URL of Page (A HREF)”);
user_pref(“copyurlplus.menus.2.copy”, “<a href=”%RLINK%” title=”%SEL%” target=”_blank” >%SEL%</a>”);
user_pref(“copyurlplus.menus.2.label”, “Copy URL of SEL (A HREF)”);

編輯完後,儲存,重新啟動 Firefox ,按下右鍵,選 Copy URL+ 你應該就可以看見自訂的格式了 🙂

ps. 如果你懶的話,也可以直接下載這個 user.js.txt 更名後放到適當的目錄 🙂

在〈複製 URL 的好工具:CopyURL+〉中有 6 則留言

  1. 哇!真的感謝介紹!
    這東東真的不錯!!
    未來貼文會快一點囉^^

    PS.您是用WP架的哦!最近看到不少WP的BLOG,
    看起來都不錯呢^^
    唉,可惜我只熟MT,這幾天可能為了多作者的問題,
    要花錢買授權了,真悶@@

    回覆
  2. HI,

    請教我照您的方法做結果不行捏 ..

    我的 %AppData%Mozilla\Firefox\Profiles\ 下未有 user.js 於是我新建了它,
    並在其內放入如您 user.js.txt 的 copyurlplus 那四行,
    另外又加了http://www.mozilla.org/editor/midasdemo/securityprefs.html 的這 capability 四行,
    save後,關掉再重開 Firefox ,卻啥看不到預期成果…

    煩請再指點一下,謝~~~

    回覆
  3. HI,

    請教我照您的方法做結果不行捏

    我的 %AppData%Mozilla\Firefox\Profiles\ 下未有 user.js 於是我新建了它,
    並在其內放入如您 user.js.txt 的 copyurlplus 那四行,
    另外又加了http://www.mozilla.org/editor/midasdemo/securityprefs.html 的這 capability 四行,
    save後,關掉再重開 Firefox ,卻啥看不到預期成果…

    煩請再指點一下,謝~~~

    回覆
  4. Huang:

    user.js 不是放在 %AppData%Mozilla\Firefox\Profiles\ 下,
    而是放在 %AppData%Mozilla\Firefox\Profiles\xxx.default 下喔。

    同目錄下應該還會有一堆其他的目錄/檔案,諸如: Cache/ 和 bookmarks.html 等。

    回覆
  5. 自動引用通知: jclin :: The Life of Me & iBook

jclin :: The Life of Me & iBook 發表迴響取消回覆

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料