下载Chrome插件
下载谷歌插件:Tampermonkey油猴插件
使用方法
1、点击油猴,打开控制面板
2、点击加号,添加脚本
3、添加脚本内容,下面有代码。
4、打开需要调试页面,按F12,刷新即可。
打开油猴管理面板.png
点击加号,添加脚本.png
脚本.png
获取window对象
// ==UserScript==
// @name window
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
Object.defineProperty(window, 'goldlog', { // 修改goldlog为你需要查询的window属性
get: function() {
debugger;
return "";
},
set: function(value) {
debugger;
return value;
},
});
// Your code here...
})();
获取cookie生成与调用
// ==UserScript==
// @name 用于定位cookie中关键参数生成位置
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==
(function(){
'use strict'
Object.defineProperty(document, 'cookie', {
get: function() {
debugger;
return "";
},
set: function(value) {
debugger;
return value;
},
});
})()













网友评论