快速复制cookie

快速复制当前页面cookie

  1. // ==UserScript==
  2. // @name 快速复制cookie
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.21
  5. // @description 快速复制当前页面cookie
  6. // @author 流氓凡
  7. // @match https://gf.qytechs.cn/zh-CN/scripts?page=2&q=cookie&utf8=%E2%9C%93
  8. // @grant none
  9. // @match http://*/*
  10. // @match https://*/*
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Your code here...
  17. function copystr(str) {
  18. var oInput = document.createElement('input');
  19. oInput.value = str;
  20. document.body.appendChild(oInput);
  21. oInput.select(); // 选择对象
  22. oInput.setSelectionRange(0, oInput.value.length), document.execCommand('Copy');
  23. document.body.removeChild(oInput);
  24. alert('当前页面Cookie复制成功');
  25. }
  26. document.onkeydown =function (e) {
  27. if (e.altKey&& e.keyCode == 67){
  28. copystr(document.cookie);
  29. }
  30. }
  31. })();

QingJ © 2025

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