
--
Cougar
davipt wrote:Dennis_Halmstad wrote:davipt wrote:http://userscripts.org/scripts/show/152981
dont work.
Updated with your suggestion. Try now
davipt wrote:
Ok I've updated the bootstrap but had time only to test it on Firefox and greasemonkey, can you check if it works with Chrome now?
http://userscripts.org/scripts/show/152981
function ra_init() {
Waze = unsafeWindow.Waze;
wazeModel = unsafeWindow.wazeModel;
OpenLayers = unsafeWindow.OpenLayers;
selectionManager = unsafeWindow.selectionManager;
selectionManager.events.register("selectionchanged", null, raSelectionChanged);
}
unsafeWindow.selectionManager
var selectionManager = unsafeWindow.selectionManager
davipt wrote:Dennis_Halmstad wrote:Its a gr8 start.
It seams that it dont work if u use tampermonkey in chrome.
Its the way this script get acces to WME that causes problems. Other scripts with unsafeWindow works.
I've just copied verbatim what the other scripts were doing. I don't use chrome (I hate a browser that consumes 300MB every other week of my limited disk space) but I'll have a look at it when I can. I've tested it without any tampermonkey extension, and it was working out of the box.
Dennis_Halmstad wrote:davipt wrote:http://userscripts.org/scripts/show/152981
dont work.
Dennis_Halmstad wrote:if u use the code described here it works in greasmonkey(firefox), chrome (native) and tampermonkey (chrome) http://www.waze.com/wiki/index.php/Comm ... _and_Tools
the difference is that u need to use unsafeWindow before the partsu need to access from WME.
eg if u want to use selectionManager u can reach it viaor
- Code: Select all
unsafeWindow.selectionManager
- Code: Select all
var selectionManager = unsafeWindow.selectionManager
and u dont need to change ur code other than the starting code. (exept adding other vars with parts u need from wme, Waze, OpenLayers eg)
Users browsing this forum: Majestic-12 [Bot]