You can disable this warning for each and every file you open (check the example screenshot below) but that quickly becomes tedious.
The policy we will edit allows you to configure the list of low-risk file types known to Windows. If the attachment is in the list of low-risk file types, Windows will not prompt you before accessing the file, regardless of the file's zone information.
Open your Group Policy by pressing Windows Key + R on your keyboard and then entering gpedit.msc and pressing enter.
In the left pane navigate to User Configuration, Administrative Templates, Windows Components, Attachment Manager.
Double click on the "Inclusion list for low file types" policy and select Enabled and paste the following line in the Specify low-risk extensions input field: .js and click ok.
This change works immediately on Windows 10 Pro version 2004. You might need to restart if you have an earlier version of Windows. Unfortunately, this looks like it is only available on Pro and Enterprise versions of Windows.
Founder of SOFTKUBE, lead developer, and getting things done addict. Passionate about open source, user interface design, business development, and the tech world.
A small team of experts developing simple, usable, and high-quality web solutions. We blog about business, entrepreneurship, web development, and technology.
How to Disable Open File Security Warnings on Windows by File Type
Business Cheat Sheets CLI Design Development Downloads Drupal Email Google Apps HID Keyboards Multilingualism Open Source Philosophy PHP Pointing Devices Productivity Quotes Science Security SEO Technology Thoughts Windows Zend Framework