Easy Cookie Manager

A manager that helps you to set cookies instantly!

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/421266/905199/Easy%20Cookie%20Manager.js

  1. // ==UserScript==
  2. // @name Easy Cookie Manager
  3. // @namespace https://gf.qytechs.cn/en/scripts/421266-easy-cookie-manager
  4. // @version a0.2
  5. // @description A manager that helps you to set cookies instantly!
  6. // @description To use Say setCookie(Name,value,domain,path,expires);
  7. // @description If you don't want one of them to be used, do "" (NO SPACE)
  8. // @description To get cookies say getCookie(name)
  9. // @author You
  10. // @match *://*.*/*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // I realised that you can't search up library scripts. The old code it alert("This userscript Uses Easy Cookie Manager. Search up on gf.qytechs.cn.");
  15. function setCookie(name,value,domain,path,expires) {
  16. document.cookie=name+"="+value+"; domain="+domain+"; path="+path+"; expires="+expires;
  17. }
  18. function getCookie(name) {
  19. try {
  20. cookie = document.cookie.split(name+"=")[1].split("; ")[0]
  21. } catch(err) {
  22. throw("A deleted or a non existed cookie found")
  23. }
  24. return cookie
  25. }
  26.  

QingJ © 2025

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