User talk:Aichon: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
m (Oops. I accidently added my level 2 header twice)
Line 135: Line 135:


==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)
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.
* 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.
* 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.
* 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>.
* 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.
* 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.
--[[User:Thvortex|Thvortex]] 20:58, 12 October 2010 (BST)
:Holy cow, those changes are awesome and that's a lot of work you did there. Looking through the diff file, I don't see anything unexpected, and after installing it on Safari and fooling around with it a bit, I absolutely love the changes you made (and, yep, the <code>unsafeWindow</code> change works fine).
:How did you get all of the location links anyway? I had considered a feature like that at one point, but didn't feel like making a program to go through and determine the valid ones links from the invalid. I figured it'd just be easier and more generally useful at this point to push through a wiki project which aimed to create pages for each set of coordinates which then redirect to the actual location page, but I hadn't gotten around to that either. >_<
:The only change I might make is to put the coordinates at the front of the line, rather than the end, that way they don't look like they bounce around so much, but otherwise I absolutely love it all.
:Also, I get the distinct impression that you're much more proficient at this stuff than I am (it's just an idle time hobby for me), so any changes you want to suggest to other scripts would be most welcome. {{User:Aichon/Signature}} 21:29, 12 October 2010 (BST)

Revision as of 20:29, 12 October 2010

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