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
hrefattribute (in some cases).However if the
hrefattribute is 开发者_StackOverflow中文版retrieved viagetAttribute()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.
加载中,请稍侯......
精彩评论