


Develop Internet Explorer right-click menu (ContextMenu)_javascript skills
Refer to MSDN Library [Adding Entries to the Standard Context Menu] to develop ContextMenu
1. IE's additional ContextMenu is created through the registration code HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt
2. So just add one under this location Key value, for example: if [Make 0rz] is added, the function of the same name will appear when you right-click in IE
For example: if we change the Key value from [Make 0rz] to [&Make 0rz], then pressing M when the ContextMenu appears will execute the function
4. Under the Key value, An important key value is Contexts. Its main function is to define the timing when ContextMenu appears
If ContextMenu wants to contain more than two occurrence times, just do the logic or calculation on the value and then bring it in
For example: in this example In the example, we can add a new DWORD type named Contexts and a key value of 23. It means that if you right-click the ContextMenu [Default Loading], [On Link], [On Image], the [Make 0rz] function will appear.
5. There is also the key value (Default). The content filled in in this key value is who the user will hand over when executing the ContextMenu function. It may be .html, .exe, .dll…. etc.
For example, in this example, I want to call javascript to execute the function, so I fill in [file://C:Program FilesMake0rz.js]
6. This basically completes the registration code part. We make it easier for users to install by creating .reg files. The following is this example RegMake0rz.reg file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt&Make 0rz]
@="file://C:\Program Files\Make0rz.js"
"Contexts"=dword:00000023
7. The following is the content of Make0rz.js:
[Default Loading]: In a blank space of the page, right-click to execute [Make 0rz] of ContextMenu, which means the current page link will be shortened.
[On link]: On a text link, right-click to execute [Make 0rz] of ContextMenu, which means that the text link will be shortened.
[Default Loading]: Right-click on the image link or image to execute [Make 0rz] of ContextMenu to indicate the image position and shorten the URL.
In javascript, use external.menuArguments.event to determine when the user right-clicks and get the element
Use external.menuArguments.event.srcElement.href to get the link to the element
Use external.menuArguments.location.href to obtain the link of the current page
Then use window.open to open the 0rz.tw target page to display the result of shortening the URL.
If you execute 30 – 33 of the code, it means there is a preview screen (Preview); if you execute 35-38, there is no preview screen. (You can freely adjust it according to your needs)
8. Actual result map:
(1) In the blank space, right-click to execute [Make 0rz] of ContextMenu, which means that the current page link will be shortened. (Presented with No Preview function)
This function The example can be click here to download. The compressed file includes: RegMake0rz.reg registered machine code installation file, Make0rz.js function execution file, DelMake0rz.reg registered machine code uninstallation file
Installation: Execute RegMake0rz.reg, place Make0rz.js in the C:Program Files directory
Uninstall: execute DelMake0rz.reg, and delete the C:Program FilesMake0rz.js file yourself

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Unlike the Explorer.exe high CPU usage issue in Windows 11, a computer may experience high CPU usage. This is completely normal, as long as it happens rarely and doesn't significantly affect your PC's performance. However, this can become a problem when it occurs repeatedly. It can heat up your system, delay loading times, and potentially freeze while you're working on important tasks. Why is my computer experiencing high CPU usage with Explorer.exe? Typically, a computer may experience high CPU usage due to one of the following reasons: Running programs that require higher CPU requirements: Video editing and gaming software can trigger high CPU usage. If published with

Solution to the explorer.exe application error: 1. Press the "win" + "R" key combination on the keyboard, and then enter the command "inetcpl.cpl" in the run window that opens; 2. Select the "Advanced" option above Card, click "Reset" below; 3. In the pop-up window, check "Delete Personal Settings", then click "Reset" below. If the above operations cannot solve the problem, please check whether there are Trojans on the computer. At this time, it is recommended to reinstall the system and install an original or pure version of the system.

Public IP refers to a non-reserved address connected to the Internet using the public network, and can be freely accessed by other computers on the Internet. Each computer on the Internet has an independent IP address. This IP address uniquely identifies a computer on the Internet. This IP address refers to the public IP address.

It's no secret that Internet Explorer has fallen out of favor for a long time, but with the arrival of Windows 11, reality sets in. Rather than sometimes replacing IE in the future, Edge is now the default browser in Microsoft's latest operating system. For now, you can still enable Internet Explorer in Windows 11. However, IE11 (the latest version) already has an official retirement date, which is June 15, 2022, and the clock is ticking. With this in mind, you may have noticed that Internet Explorer sometimes opens Edge, and you may not like it. So why is this happening? exist

Starting with build 22557 and later, Windows 11 requires an Internet connection to complete first-time setup, also known as the Out-of-Box Experience (OOBE) for Home and Pro editions, although there is a way to bypass this requirement entirely. Since Microsoft wants users to connect their computers to their Microsoft accounts, the company is making changes to the initial Windows 11 setup that will make it nearly impossible to proceed with a clean installation without an Internet connection. Alternatively, if Settings detects that the device has no network connection, you will be sent to the Oops, you lost your Internet connection screen. If you click on the retry option you will see Connect to the Internet again

The main communication protocol used by the Internet is "TCP/IP protocol", TCP/IP transmission protocol, namely transmission control/network protocol, also called network communication protocol; it is the most basic communication protocol in the use of the network, TCP/IP The IP transport protocol stipulates the standards and methods for communication between various parts of the Internet.

When we use computers, we are all connected to the Internet. Only with the Internet can we surf the Internet. Recently, many users have asked me how to solve the problem of Win11 unable to connect to the Internet? Users can directly open the best matching service application provided by the system to set it up. Let this site carefully introduce to users the solution to the problem that Win11 computers cannot access the Internet. Solution 1 for Win11 computers unable to access the internet: You can press the Win+S key combination, or click the search icon next to the bottom taskbar to open the Windows search window. Enter "service" in the search box, and then click to open the best matching service application given by the system. Method Two

Steps to delete temporary Internet files: 1. Press win+r to open "Run", enter: %temp% command in the run dialog box, click OK or press Enter to open the user account temporary folder; 2. After opening the Temp folder Press the Ctrl+A keys, select all temporary files, right-click, and click "Delete" in the right-click menu; 3. If there are individual temporary files that cannot be deleted, restart the computer to delete them.
