User talk:Aichon: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
(Improvements to UDMap Script)
Line 133: Line 133:
|}
|}
--{{User:Yonnua Koponen/signature‎}} 23:24, 2 October 2010 (BST)
--{{User:Yonnua Koponen/signature‎}} 23:24, 2 October 2010 (BST)
== Improvements to UDMap Script ==
==Improvements to UDMap Script==
I made several improvements to the UDMap script that I'd like to share with the rest of the world. My version of the script is currently available [http://sites.google.com/site/thvortex/udmap.user.js here]. Would you be willing to incorporate these changes back into your own script page? I figured it would be easier for people to download off of your page since they already know where to find it, etc. I don't even have my own User:Thvortex page setup yet on the wiki. Anyway, below is the list of improvements I made. --[[User:Thvortex|Thvortex]] 20:58, 12 October 2010 (BST)
* Clicking on a space in the suburb map opens the wiki page for that location in a new browser window. Yes, this works for all 100,000 locations :) It's handy for checking the recent status of a building. It did make the script about 300KB larger to include the link information.
* When moving the mouse over the suburb, there is now a GPS coordinate added to the name of the building or street over which the mouse is hovering.
* Clicking on the city map to change the suburb view did not work in Firefox and GreaseMonkey because of the security model that GreaseMonkey uses. Basically <tt>window.switch_map</tt> doesn't work but GreaseMonkey has a workaround in the form of <tt>unsafeWindow.switch_map</tt>. <b>Please verify my script still works in Safari though</b>.
* I make use of DumbWitness a lot, and I noticed that UDMap didn't quite work right in the captured screenshot. Basically, moving the mouse over the suburb map was not displaying the building names anymore. Turns out that DumbWitness was munging the page a little bit and when it saw a <tt>\"</tt> double-quote escape in a Javascript string it would cut off the rest of the code. So in one place I switched to using single quotes and apparently DumbWitness doesn't mind a <tt>\'</tt> escape. Of course, clicking on the city map in the DumbWitness screenshot still won't do anything because that requires a call-back to the user script, and that's no longer accessible in the captured screenshot.

Revision as of 19:58, 12 October 2010

Aichon:Talk
Aichon
ˈīˌkän :Talk