我尝试将几个SIMBL插件(例如Afloat和FScriptAnywhere)注入Chrome和其他应用程序。
它适用于所有其他应用程序,但不适用于Chrome。我在控制台上得到了这个输出:
01.09.11 13:30:15,911 SIMBL Agent: Google Chrome started
01.09.11 13:30:15,912 SIMBL Agent: app start notification: {
NSApplicationBundleIdentifier = "com.google.Chrome";
NSApplicationName = "Google Chrome";
NSApplicationPath = "/Applications/Google Chrome.app";
NSApplicationProcessIdentifier = 87543;
NSApplicationProcessSerialNumberHigh = 0;
NSApplicationProcessSerialNumberLow = 30412031;
NSWorkspaceApplicationKey = "<NSRunningApplication: 0x40092c060 (com.google.Chrome - 87543)>";
}
01.09.11 13:30:15,913 SIMBL Agent: checking bundle /Users/az/Library/Application Support/SIMBL/Plugins/Afloat.bundle
01.09.11 13:30:15,913 SIMBL Agent: checking target identifier *
01.09.11 13:30:15,914 SIMBL Agent: send inject event
01.09.11 13:30:15,956 SIMBL Agent: eventDidFail:'tvea' error:Error Domain=NSOSStatusErrorDomain Code=-1708 "The operation couldn’t be completed. (OSStatus error -1708.)" (the AppleEvent was not handled by any handler ) UserInfo=0x400877940 {ErrorNumber=-1708} userInfo:{
ErrorNumber = "-1708";
}
01.09.11 13:30:15,957 [0x0-0x1d00cff].com.google.Chrome: Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax.
我认为可以忽略eventDidFail:'tvea'
错误,因为我在所有应用程序上都得到它(虽然我不知道它是什么)。
但是,我认为最后一个错误Google Chrome: OpenScripting.framework - can't find entry point InjectEventHandler in scripting addition /Library/ScriptingAdditions/SIMBL.osax
是相关错误。
这是什么意思?它可能是什么?
答案 0 :(得分:2)
啊,由于稳定性问题,它似乎被Chrome本身作为一项功能引入博客SIMBL插件。
This is the patch for Chrome。并且this is the bug report。有意思,顺便说一句。它使用mach_override from mach_star修补内部函数_CFBundleLoadExecutableAndReturnError
以添加对列入黑名单的库的检查。
我提交了一个关于禁用CFBundleBlocker here的方法的错误报告。
我找到了一种解决Chrome中CFBundleBlocker的方法:
我修改了SIMBL以便在/System/Library
而非/Library
中工作。修补后的版本可以找到here。此外,修补的SIMBL也在/System/Library/Application Support/SIMBL/Plugins/
中搜索SIMBL插件。必须在该目录中安装SIMBL插件,否则Chrome也会阻止它们。