Discussions » Development

库:[ js.hook.js ] javascript钩子

v1
§
Posted: 2015-11-22
Edited: 2015-11-24

库:[ js.hook.js ] javascript钩子

https://greasyfork.org/zh-CN/scripts/14106-js-hook-js

可以修改修改方法接收的参数和返回值
编写扩展网站原有功能的脚本十分有用



§
Posted: 2015-11-22

我都是手动修改 因为相对于底层的 Hook,js 劫持起来实在是太简单 >.>

但是这个写法很美观的样子

文科Mod
§
Posted: 2015-11-22

猴赛雷

§
Posted: 2015-11-23

目测不支持grearemonkey的沙箱?

v1
§
Posted: 2015-11-23

目测不支持grearemonkey的沙箱?

// ==UserScript==
// @name         js.hook.js test
// @namespace    http://tampermonkey.net/
// @match        https://greasyfork.org/*
// @grant        unsafeWindow
// @require https://greasyfork.org/scripts/14106-js-hook-js/code/%5B%20jshookjs%20%5D.js?version=88861
// ==/UserScript==


var hook = hook_js;
hook('unsafeWindow.alert').fakeArg('fakeArg');

Tampermonkey中运行良好

§
Posted: 2015-11-23

目测不支持grearemonkey的沙箱?

// ==UserScript==
// @name         js.hook.js test
// @namespace    http://tampermonkey.net/
// @match        https://greasyfork.org/*
// @grant        unsafeWindow
// @require https://greasyfork.org/scripts/14106-js-hook-js/code/[ jshookjs ].js?version=88861
// ==/UserScript==


var hook = hook_js;
hook('unsafeWindow.alert').fakeArg('fakeArg');

Tampermonkey中运行良好

grearemonkey的沙箱指的应该是 Firefox 下的 GM 插件的沙箱

v1
§
Posted: 2015-11-24

目测不支持grearemonkey的沙箱?

// ==UserScript==
// @name         js.hook.js test
// @namespace    http://tampermonkey.net/
// @match        https://greasyfork.org/*
// @grant        unsafeWindow
// @require https://greasyfork.org/scripts/14106-js-hook-js/code/[ jshookjs ].js?version=88861
// ==/UserScript==


var hook = hook_js;
hook('unsafeWindow.alert').fakeArg('fakeArg');

Tampermonkey中运行良好

grearemonkey的沙箱指的应该是 Firefox 下的 GM 插件的沙箱

嗯,可我又不用ff

Post reply

Sign in to post a reply.