This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name npmjs.com Explore → unpkg.com Browse | |
// @author Alex Yorke (credits to Alexander Pushkov <alexander@notpushk.in>) | |
// @version 2 | |
// @grant none | |
// @include https://npmjs.com/package/* | |
// @include https://www.npmjs.com/package/* | |
// ==/UserScript== | |
const oldExploreLink = document.querySelector('a[href="?activeTab=explore"]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(` | |
[Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ | |
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!" | |
Break | |
} | |
Write-Host "Excluding appdata NPM folder and Node.JS install folder from Windows Defender." | |
Add-MpPreference -ExclusionPath ([System.Environment]::ExpandEnvironmentVariables("%APPDATA%\npm\")) | |
Add-MpPreference -ExclusionPath (Get-ItemProperty "HKLM:SOFTWARE\Node.js" | Select-Object -Property InstallPath) |