Website Password Lock

Lock a website with a password

  1. // ==UserScript==
  2. // @name Website Password Lock
  3. // @version 1.0
  4. // @description Lock a website with a password
  5. // @author Tigertech
  6. // @grant none
  7. // @include https://*
  8. // @include http://*
  9. // @greasyfork
  10. // @updateURL
  11. // @grant none
  12. // @namespace https://gf.qytechs.cn/users/1228152
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. const correctPassword = 'Tigertech';
  18. let userPassword = prompt('Enter the password to access this site:');
  19. if (userPassword !== correctPassword) {
  20. document.body.innerHTML = '<h1>Access Denied. Check the userscripts home page to learn more.</h1>';
  21. } else {
  22. alert('Access Granted!');
  23. }
  24. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址