开发者

Port Greasemonkey script to Chrome

I have found a Greasemonkey script which works fine in Firefox but not in Chrome, which is my preferred browser. http://userscripts.org/scripts/show/105578

I have tried to fix it myself but without luck. I have posted my findings during debugging, here.

How do I fix it?


Update: (from OP comment)

Got it working by contacting the developer of TamperMonkey. With the newest beta of TamperMonkey and a modification of the script it works. See this thread at userscripts.org.

An additional issue noted: It seems that Chrome forbids the direct access to the anchor's href attribute (in some cases).

However if the href attribute is 开发者_StackOverflow中文版retrieved via getAttribute() everything works fine.


Chrome does not support the GM_ functions natively, and that script makes heavy use of cross-domain GM_xmlhttpRequest().

The smartest thing to do is to install Tampermonkey, which can probably run the existing script as is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜