Block access to specific websites with password protection
目前為 2023-04-14 提交的版本,檢視 最新版本。
這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。
1. Added a more secure way to store passwords using the SHA-256 hashing algorithm.2. Used a regular expression to check if the current page matches a blocked URL, instead of using `startsWith()`.3. Added an option to enter a custom error message in the script settings.4. Improved error handling by checking if the user cancels the password prompt and redirecting to the error page accordingly.5. Removed the unnecessary use of a `let` variable to declare the `isBlocked` variable.6. Used a template literal to construct the error page URL, instead of concatenating strings.7. Used the `confirm()` method instead of the `prompt()` method to ask the user if they want to remember the password.8. Added comments to explain the changes made to the script.