在瀏覽器右鍵新增自定義選單

2021-05-09 08:08:57 字數 2588 閱讀 6528

其實很簡單,先把下列**存為 abc.reg 並匯入:

windows registry editor version 5.00

[hkey_current_user/software/microsoft/internet explorer/menuext/複製影象位址(&z)]

@="c://copyimageurl.htm"

"contexts"=dword:00000002

並把下列**存為 c:/copyimageurl.htm:

重啟你的瀏覽器就可以用了。

要注意幾點:

這個功能適用於 ie 和所有以 ie 為核心的第三方瀏覽器,比如 mathxon。

「複製影象位址(&z)」後面的符號 z 為快捷鍵,根據不衝突又易按的原則,你至少還可以改為:q、w、x。

contexts 對應應用物件有:default、images、controls、tables、text selection、anchor、unknown。

與 contexts 並列的,還有乙個可選的雙位元組 flags,值為 0x1 時,指令碼將以視窗對話方塊方式執行。

如果指令碼存在於某 dll 檔案的 123 位置,還可以用「example.dll, 123」這樣的指向來定義。

快捷鍵

根據個人經驗,熟練地使用這個功能,至少可以讓操作快上 80% 的時間,甚至 flashget 預設也沒設定這個人性化的功能,遺憾。不過我們完全可以修改之,嘿嘿!

可選項

value constant_name description

0x01 context_menu_default shown on all context menus.

0x02 context_menu_image context menu of images only.

0x04 context_menu_control context menu of form controls only.

0x08 context_menu_table context menu of tables only.

0x10 context_menu_textselect context menu of selected text only, including images in a selected region.

0x20 context_menu_anchor context menu of links only. does not include linked images or image maps.

0x40 context_menu_unknown right-click on none of the above.

多種值綜合應用是「或」的關係,比如需要在預設和連線時右鍵時顯示,則 contexts=0x21;想單獨在上顯示,則 contexts=0x02 了。

舉例

下面例子可以將頁面在新視窗顯示:

windows registry editor version 5.00

[hkey_current_user/software/microsoft/internet explorer/menuext/show in new window]

@="file://c://example2.htm"

"contexts"=dword:00000001

c:/example2.htm

下面例子可以將選中文字變為大寫:

windows registry editor version 5.00

[hkey_current_user/software/microsoft/internet explorer/menuext/my &menu item]

@="file://c:/myscript.htm"

"contexts"=dword:00000001

c:/myscript.htm

效果

刪除

將下列**存為 unreg.reg 並匯入就可以了:

windows registry editor version 5.00

[-hkey_current_user/software/microsoft/internet explorer/menuext/複製影象位址(&z)]

參考

如何在右鍵選單新增「拷貝影象位址」

目前自己用的:

自定義瀏覽器右鍵選單的實現

在我們開發web專案的時候,有些操作可能針對平台無關的,而這些操作可能可以在任何其他 上使用,如最典型的網路收藏夾的應用,那麼如何在作業系統的瀏覽器右鍵選單中加入我們自定義選單呢?通過寫登錄檔的方式加入即可,如下 regedit4 hkey current user software microso...

自定義右鍵選單

禁止系統右鍵選單 document.oncontextmenu function 獲取滑鼠藍色框選中的內容 document.getselection tostring 火狐不能得到文字框內的內容 示例 utf 8 title ulli li hover style head aaaa rows 4...

如何自定義Edge瀏覽器的右鍵選單,支援百度搜尋

chrome瀏覽器有乙個實用的功能 當你選中一段文字,點滑鼠右鍵,彈出選單中會出現 用google搜尋 這個功能便於快速搜尋選中的文字。edge瀏覽器沒有這項功能,不得不說很是遺憾。於是寫了個外掛程式,經常使用edge瀏覽器的朋友,終於可以有相同體驗了。安裝方法 在edge瀏覽器中輸入 about ...