Tartışmalar » Geliştirme

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

v1
§
Gönderildi: 22.11.2015
Düzenlendi: 24.11.2015

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

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

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



§
Gönderildi: 22.11.2015

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

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

文科Mod
§
Gönderildi: 22.11.2015

猴赛雷

§
Gönderildi: 23.11.2015

目测不支持grearemonkey的沙箱?

v1
§
Gönderildi: 23.11.2015

目测不支持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中运行良好

§
Gönderildi: 23.11.2015

目测不支持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
§
Gönderildi: 24.11.2015

目测不支持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

Cevap paylaş

Yanıt göndermek için oturum açın.