Have you ever encountered a situation where you want to copy an inspiring quote or inspect a particular element, but the right-click menu simply doesn’t work? This is where void document oncontextmenu=null works.
互联网世界正以异常指数级的速度增长,许多网站都有很棒的内容。我们有时想保存内容以备将来使用,但当您尝试右键单击保存内容时,您会看到一条错误消息,指出“抱歉,此功能已被管理员禁用。(Sorry, this functionality has been disabled by the administrator.)” 该错误通常意味着站点管理员或所有者禁用了右键单击选项,以保护其内容免受抄袭和试图窃取其作品的用户的影响。重写内容是一项乏味的任务,但我们还有其他选择吗?如果您只需要复制内容的某些部分,那么您可以使用一些变通方法从右键单击禁用的网站进行复制。可以使用的最简单的方法之一是 void 文档 oncontextmenu=null。但是,请勿将这些方法用于不道德的黑客攻击目的。此外,请尝试遵循下面列出的所有方法,因为可能对一个用户有用的方法可能不适用于另一个用户。
什么是无效Document Oncontextmenu=null,以及如何使用它?
无效(Void)文档 oncontextmenu=null 是一个简单的JavaScript片段,您可以使用它来启用对已阻止它的网站的右键单击。您可以通过轻松简单的步骤来使用它。首先(First),转到已禁用右键单击的网站。在URL(URL)栏(地址栏)中键入以下代码,然后按 Enter:
javascript: void(document.oncontextmenu=null);
此JavaScript代码将绕过网站的警报,然后您可以轻松使用右键菜单。但无法保证此方法适用于每个网站,因为网站管理员使用不同的方式禁用右键单击。这种方法的另一个缺点是,每次您希望从网站复制时,都必须将上述代码粘贴到地址栏中。
在禁用它的网站上启用右键单击的 6 种方法(6 Ways to Enable Right Click on the Websites that have Disabled it)
1.尝试使用阅读器模式(1. Try to Use Reader Mode)
这是一个简单的一步过程,可以在禁用它的网站上使用右键单击。为此,请按 F9(press F9)启用浏览器阅读器模式(Browser Reader Mode)并检查右键单击是否有效。虽然它不是一个有保证的修复,但只需一秒钟即可尝试!
2.禁用JavaScript以启用右键菜单(2. Disable the JavaScript to Enable the Right-Click Menu)
网站管理员经常使用JavaScript代码来禁用对其网站的右键单击。您可以完全禁用JavaScript以访问右键菜单。
在谷歌浏览器中(In Google Chrome)
1. 单击屏幕右上角的三个垂直点,然后选择(three vertical dots)设置(Settings)选项。
2. 找到隐私和安全(Privacy and Security)并点击站点(Site) 设置(Settings)。
3. 转到内容设置(Content Settings)并找到JavaScript。单击切换以禁用(disable)它。
在 Mozilla 火狐中(In Mozilla Firefox)
打开一个新选项卡,在地址栏中输入“ about:config ”,然后按(about: config)Enter。在搜索首选项栏中搜索JavaScript ,然后按(JavaScript)Enter。双击“ javascript.enabled”选项将其状态从真变为假(false)。
该方法的缺点是大多数网站都使用JavaScript来正常运行。禁用它可能会停止某些网页元素,在某些情况下会停止整个网站,因此您应谨慎使用此功能。禁用Javascript后,重新加载网站并使用右键单击功能。完成工作后,请务必重新启用JavaScript,以确保其他网站正常运行。
另请阅读:(Also read:) 如何修复 javascript:void(0) 错误(How to Fix javascript:void(0) Error)
3.使用页面的源代码复制你需要的文本(3. Use the Source Code of the Page to Copy the Text you need)
如果您只想使用右键复制内容,那么还有另一种有利的方式。这是一种非常方便的方法,使用后会发现非常方便。
转到要从中复制内容的网站。在键盘上同时按Ctrl+ U打开网站的源代码。源代码没有禁用右键单击功能。找到内容并从源代码中复制。(Find the content and copy it from the source code.)
4.保存网页以启用右键菜单(4. Save the Webpage to Enable the Right-Click Menu)
这也是解决禁用的右键单击菜单的许多有效方法之一。将所需的网页另存为HTML,然后您可以像往常一样打开它并复制内容。按键盘上的Ctrl+ S,然后保存(save)网页。
5. 使用代理服务器从网站复制内容(5. Use a Proxy Server to Copy Content from a Website)
代理服务器允许您安全和匿名地浏览,也可以用来避免禁用的右键菜单。
您可以使用许多代理服务器,例如 Proxify 和 FilterByPass。只需在(Simply)代理(Proxy)网站中输入您希望右键单击功能起作用的网站。这样做后,您可以匿名浏览和浏览网站,这将帮助您避开右键单击警告。您可能还需要取消选中代理服务器中的“删除脚本(Remove Scripts)”框以避免运行网站脚本。取消选中该框以确保网站运行顺畅。
6.使用浏览器扩展(6. Use Browser Extensions)
您可以使用许多第三方浏览器扩展来启用网站上的右键单击上下文菜单。对于Google Chrome来说,Absolute Enable Right Click & Copy扩展是安全可靠的。它可以帮助您非常轻松地访问禁用的右键菜单。对于Firefox,您可以使用相同的扩展名Absolute Enable Right Click & Copy。如果这些不可用,那么您可以搜索其他扩展并尝试它们。其中有很多是免费的。
受到推崇的:(Recommended:)
我们现在已经学习了几种方法来解决禁用的右键单击菜单。从Javascript无效文档 oncontextmenu=null 到使用代理服务器和浏览器扩展,所有这些都易于使用且安全。但是,我们绝不能利用这些方法进行不道德的工作。(But, we must not exploit the use of these methods for doing unethical works.)网站管理员经常禁用右键单击功能以避免抄袭问题并保护他们的工作。处理此类内容时应谨慎。
What Is Void Document Oncontextmenu=null? Enable The Right Click
Have you ever encountered a situation where you want to copy an inspiring quote or inspect a particular element, but the right-click menu simply doesn’t work? This is where void document oncontextmenu=null works.
The internet world is growing at an exceptionally exponential rate, and many websites have great content. We sometimes want to save content for future use, but as soon as you try to right-click to save the content, you will see an error message stating “Sorry, this functionality has been disabled by the administrator.” The error usually means that the site administrator or owner has disabled right-click option to protect their content from plagiarism and from users who try to steal their work. Re-writing the content is a tedious task, but what other options do we have? If you need to copy only certain parts of the content, then you can use a few workarounds to copy from right click disabled websites. One of the easiest ways that can be used is the void document oncontextmenu=null. However, do not exploit these methods for unethical hacking purposes. Also, try to follow all the methods listed below, as what may work for one user might not work for another.
What is Void Document Oncontextmenu=null, and how to use it?
Void document oncontextmenu=null is a simple JavaScript piece that you can use to enable right click on the websites that have blocked it. You can use it by following an effortless and easy step. First, go to the website that has disabled the right-click. Type the following code in the URL bar (address bar) and press enter:
javascript: void(document.oncontextmenu=null);
This JavaScript code will bypass the website’s alert, and then you can easily use the right-click menu. But there is no guarantee that this method will work on each & every website as the webmasters use different ways to disable right-click. Another drawback of this method is you have to paste the above code in the address bar each time you wish to copy from the website.
6 Ways to Enable Right Click on the Websites that have Disabled it
1. Try to Use Reader Mode
This is a straightforward one-step process to use right-click on websites that have disabled it. For this purpose, press F9 to enable the Browser Reader Mode and check whether the right click works or not. Although it is not a guaranteed fix but it only takes a second to try!
2. Disable the JavaScript to Enable the Right-Click Menu
Webmasters often use JavaScript codes to disable right click on their websites. You can disable the JavaScript altogether to access the right-click menu.
In Google Chrome
1. Click on the three vertical dots at the top right corner of your screen and choose the Settings option.
2. Find Privacy and Security and click on Site Settings.
3. Go to Content Settings and find JavaScript. Click on the toggle to disable it.
In Mozilla Firefox
Open a new tab, type ‘about: config’ in the address bar, and press Enter. Search for JavaScript in the search preference bar and press Enter. Double click on the ‘javascript.enabled’ option to turn its status to false from true.
The downside of the method is that most websites use JavaScript to function properly. Disabling it might stop some of the web page elements and, in some cases, the entire website, so you should use this function with caution. Once you disable the Javascript, reload the website and use the right-click function. Always enable the JavaScript back once you are finished with your work to make sure other websites function properly.
Also read: How to Fix javascript:void(0) Error
3. Use the Source Code of the Page to Copy the Text you need
If you only want to use right-click to copy the content, then there is another advantageous way. This is a very convenient method, and you’ll find it very handy once you use it.
Go to the website from where you want to copy the content. Press Ctrl+ U together from your keyboard to open the source code of the website. The right-click feature isn’t disabled for the source code. Find the content and copy it from the source code.
4. Save the Webpage to Enable the Right-Click Menu
This is also one of the many effective ways to work around the disabled right-click menu. Save the desired webpage as HTML, you can then open it and copy the contents as usual. Press Ctrl+ S on your keyboard and then save the webpage.
5. Use a Proxy Server to Copy Content from a Website
A proxy server allows you to browse securely and anonymously and can also be used to avoid the disabled right-click menu.
There are many proxy servers that you can use, such as Proxify and FilterByPass. Simply enter the website that you want the right-click function to work in the Proxy website. After doing so, you can surf and navigate the website anonymously which will help you dodge the right click warning. You may also need to uncheck the ‘Remove Scripts’ box in the proxy server to avoid running the website scripts. Uncheck the box to make sure the website runs smoothly.
6. Use Browser Extensions
There are many third-party browser extensions that you can use to enable the right-click context menu on websites. For Google Chrome, the Absolute Enable Right Click & Copy extension is safe and reliable. It can help you access the disabled right-click menu very easily. For Firefox, you can use the same extension Absolute Enable Right Click & Copy. If these are not available, then you can search for other extensions and try them. There are plenty of them available for free.
Recommended:
We have now learned several methods to work around the disabled right-click menu. From the Javascript void document oncontextmenu=null to using proxy servers and browser extensions, all are easy and safe to use. But, we must not exploit the use of these methods for doing unethical works. The webmasters often disable right-click functions to avoid plagiarism issues and protect their work. You should be cautious when handling such content.