|
|
Line 1: |
Line 1: |
| {{User:Klexur/navbar}} | | {{User:Klexur/navbar}} |
| {{TOCright}} | | {{TOCright}} |
| | <span style="font: bold larger 'Lucida Console'; text-shadow:1px 1px 0px black; color: white;">Userscript specific discussion can be found [[User_Talk:Klexur/Userscripts|here]].</span> |
| == General == | | == General == |
| Thanks for the [http://wiki.urbandead.com/index.php?title=External_Links&curid=18168&diff=1998078&oldid=1991063 feedback on extensions]! I'll see if I can take a look or at least prod the people responsible. (I make no promises. {{shifty}}) | | Thanks for the [http://wiki.urbandead.com/index.php?title=External_Links&curid=18168&diff=1998078&oldid=1991063 feedback on extensions]! I'll see if I can take a look or at least prod the people responsible. (I make no promises. {{shifty}}) |
Line 11: |
Line 12: |
| : Haha, thanks. I'm still fairly new to making userscripts, but why do you not want me looking at your early ones? I might learn something. =P --[[User:Klexur|Klexur]] 01:58, 23 June 2012 (BST) | | : Haha, thanks. I'm still fairly new to making userscripts, but why do you not want me looking at your early ones? I might learn something. =P --[[User:Klexur|Klexur]] 01:58, 23 June 2012 (BST) |
| ::About all you'd learn is what not to do. :P I rewrote one or two of them later on, and I was able to reduce the code by as much as 90% while making it both clearer and more efficient. I have no doubt that there are hundreds of examples of shoddy code still in my userscripts, since I was brand new to making them when I started making them for UD. {{User:Aichon/Signature}} 05:40, 23 June 2012 (BST) | | ::About all you'd learn is what not to do. :P I rewrote one or two of them later on, and I was able to reduce the code by as much as 90% while making it both clearer and more efficient. I have no doubt that there are hundreds of examples of shoddy code still in my userscripts, since I was brand new to making them when I started making them for UD. {{User:Aichon/Signature}} 05:40, 23 June 2012 (BST) |
|
| |
| ==UD PK Reporter/Private==
| |
| Nice PK reporting scripts. I noticed that when you use private PK Reporter, your AP, HP and Inventory remain hidden in the game screen after the witness is taken. They come back after a refresh but was just wandering if that is just the way it is or some other way around it. Only down side is that refreshing the map takes IP hits. ~[[Image:Vsig.png|link=User:Vapor]] <sub>03:52, 23 June 2012 (UTC)</sub>
| |
| : Nice catch, I actually just wrote that an hour ago. I'll see about replacing the values after submitting to Dumbwit. --[[User:Klexur|Klexur]] 03:59, 23 June 2012 (BST)
| |
| ::That would be good. It's not thaaaat big of a deal. There is another issue, though. If this script is enabled and you perform a regular dumwit, it will still open a window to report to RG. Nice if that all you intend to use dumwit for but not so nice if you just want to post the wit somewhere else. I'm going to keep the script and just enable it when I want to make an RG report (it really does take a lot of work out of it). If you end up updating the script, though, please let me know. Thanks. ~[[Image:Vsig.png|link=User:Vapor]] <sub>04:56, 23 June 2012 (UTC)</sub>
| |
|
| |
| What about the players who like to hold onto reports for a few days before submitting them? RG has a two week deadline to submit PK reports. --{{User:Axe Hack/Sig}} 06:52, 23 June 2012 (BST)
| |
| : What about them? =P I'll be making another version which will only hide HP, AP, and Inventory then make the Dumbwit report. It won't automatically submit it to RG. --[[User:Klexur|Klexur]] 16:30, 23 June 2012 (BST)
| |
| ::What about those using Aichon's Barrista, which turns the HP/AP stuff into a bar at the top left of the page? --{{User:Axe Hack/Sig}} 18:07, 23 June 2012 (BST)
| |
| :::He would have to specifically code it to remove the numbers from Barrista, which shouldn't be too bad with some simple XPath code, given that Barrista's structure for that portion never changes, meaning he wouldn't need to consider any edge cases. {{User:Aichon/Signature}} 19:08, 23 June 2012 (BST)
| |
| Updated for Aichon's new Barrista. --[[User:Klexur|Klexur]] 06:48, 29 June 2012 (BST)
| |
|
| |
| ==UD Map Skinner==
| |
| For some reason its not displaying cathedral skins. An oversight, or a lack of images from the original incarnation? --[[User:Rosslessness|Ross]]<sup>[[User:Rosslessness/Battle of Tebbett|less]]</sup>[[User:Rosslessness|ness]] 13:57, 23 June 2012 (BST)
| |
| :UDTool never had skins for cathedrals. I think the Zookeepers' map skins are just a bit better, although it breaks a few of Aichon's scripts... --{{User:Axe Hack/Sig}} 14:04, 23 June 2012 (BST)
| |
| :: That's correct, there were not images for cathedrals. I could make a version with the Zookeepers' images if you locate them for me. --[[User:Klexur|Klexur]] 16:30, 23 June 2012 (BST)
| |
| :::It's one of [http://www.ray3k.com/downloads/scripts/mapgraphics.html Ray3K's scripts]. --{{User:Axe Hack/Sig}} 18:09, 23 June 2012 (BST)
| |
| :::: Ah, right. Is he even still active? --[[User:Klexur|Klexur]] 19:17, 23 June 2012 (BST)
| |
| :::::I really don't know. You'll have to check in with the Zookeepers on that. All I know is his map skins script breaks sone of Aichon's stuff. --{{User:Axe Hack/Sig}} 21:18, 23 June 2012 (BST)
| |
| ::::::Which stuff of mine breaks? I might be able to look into making my stuff more robust for some of that. {{User:Aichon/Signature}} 21:58, 23 June 2012 (BST)
| |
| :::::::Honestly? I don't even remember. It's been a while since I had Ray's script installed. But I know it broke something. Just can't remember what. But it was definitely one of your scripts, Aich. --{{User:Axe Hack/Sig}} 23:04, 23 June 2012 (BST)
| |
| :::::::: Sounds like you're sure but not sure. --[[User:Klexur|Klexur]] 04:54, 24 June 2012 (BST)
| |
|
| |
| == UD Dumbwit Privacy ==
| |
|
| |
| Okay, for those that would like to have their HP, AP, and Inventory hidden before a Dumbwit report and restored after, try [http://userscripts.org/scripts/show/136874 this.] If you try it, please give feedback.
| |
|
| |
| Side note for [[User:Aichon|Aichon]]: If you would give the Barrista items IDs it would have made this infinitely easier! =P --[[User:Klexur|Klexur]] 05:06, 24 June 2012 (BST)
| |
| :That was actually the VERY first thing I checked when Axe mentioned it, since I did give some of them classes so that they could be manipulated using some of the CSS-altering userscripts out there. Unfortunately, I didn't give any of them IDs. Keep poking me about this if I don't post an updated version of it in the next few days. {{User:Aichon/Signature}} 05:13, 24 June 2012 (BST)
| |
| :: Poke =P --[[User:Klexur|Klexur]] 19:00, 26 June 2012 (BST)
| |
| :::You may need to keep poking me. I'm busy with a few random things after work this week, which may continue to distract me, though there's more than enough time to fix it if I actually remember to do so. {{User:Aichon/Signature}} 19:13, 26 June 2012 (BST)
| |
| ::::hop too it. i would like this to work with barrista.--{{User:Sexualharrison/sig}}<small>22:19, 26 June 2012 </small>
| |
| :::::I haven't returned home yet for the day, so I can't exactly hop to it. :P As a note to Klexur, I'll give the four objects you're grabbing the IDs "barristahptext", "barristaaptext", "barristahpbar", and "barristaapbar". That should let you code it in advance of whenever I get around to fixing things on my end, which will save your users the hassle of updating two userscripts later. {{User:Aichon/Signature}} 22:44, 26 June 2012 (BST)
| |
| :::::: You know, Aichon, you really wouldn't need to add the IDs. I know I'm late in saying that but my script works perfectly fine without them. I just had some trouble getting the XPaths right (I'm new to them) when I was coding it. =S --[[User:Klexur|Klexur]] 18:51, 28 June 2012 (BST)
| |
| :::::::Of this I am aware, but there are a few good reasons to do so anyway:
| |
| :::::::#It allows others to script for them too
| |
| :::::::#Future changes to Barrista won't break your script
| |
| :::::::#Future changes to the game won't break your script
| |
| :::::::#You need to change your code anyway (more on that in next edit)
| |
| :::::::Mainly I'm concerned with #2 and #3. While your current XPath ''does'' work, the fact that it's so explicit while using very generic elements means that it's very likely to break at the slightest tweak either to the game or Barrista. {{User:Aichon/Signature}} 20:26, 28 June 2012 (BST)
| |
|
| |
| In glancing at your code, I noticed that it has the potential for a few issues. I don't think they're actually causing any problems, but I thought I'd point them out in case you're interested:
| |
| #When you're checking to see if Barrista exists, using .snapshotitem(0) at the end of the line will throw exceptions when no snapshotitems are returned (as would be the case when Barrista exists). Admittedly, it's a bad practice still found in some of my userscripts, but the better way to handle it is to not use .snapshotitem(0) until you know that an item exists, and instead use .snapshotLength > 0 in your if statement to check for them. That issue is in a few places.
| |
| #If you want to check for Barrista, it'd be better if you checked for it, rather than checking for the lack of something it removes, since other userscripts may remove the gt div as well. I'll add a "barrista" id for the outermost barrista div when I make my changes, that way it's easier to check for.
| |
| #When you try to grab HP from Barrista, you have "//" in the XPath code, which means that the div does not ''need'' to be an immediate child of body. As a result, other divs may be grabbed in addition to the correct one. By itself that isn't a problem, but because you're using UNORDERED_NODE, we can't say for sure which one will be .snapshotitem(0) vs. .snapshotitem(1) and so on, but you're always using .snapshotitem(0). That means you may end up using the wrong div in some cases. Switching it to ORDERED_NODE or just a "/" should fix the issue, I think (ideally the latter, since ORDERED_NODE is slower than UNORDERED_NODE).
| |
| Anyway, keep using XPath, since all of the major browser vendors have done heavy optimization around it, meaning that it's very fast compared to things like GetElementById. {{User:Aichon/Signature}} 20:44, 28 June 2012 (BST)
| |
| : That has got to be the most detailed and informative glance I've heard of in my life. THANK YOU! I'll try to have this updated in the next few days. Please feel free to continue glancing. --[[User:Klexur|Klexur]] 21:14, 28 June 2012 (BST)
| |
| ::Lol, well, I just looked at the code related to Barrista to see if there were any other IDs that could help, and that's when I saw loads of divs, which got me looking a bit more closely, though I still only looked at the stuff related to Barrista. :P {{User:Aichon/Signature}} 01:03, 29 June 2012 (BST)
| |
| ::: Well it's a good thing you did because it made me look back over the rest. I must have been real tired when I "finished" it because I also found unused code and some redundancy. -_- I cleaned it up and will upload the id version once you finish yours so that they will match. --[[User:Klexur|Klexur]] 01:23, 29 June 2012 (BST)
| |
| ::::Updated Barrista, finally. Let me know if I did something stupid like misspell an ID. :P {{User:Aichon/Signature}} 01:48, 29 June 2012 (BST)
| |
| ::::: Uploaded mine as well. --[[User:Klexur|Klexur]] 06:48, 29 June 2012 (BST)
| |
|
| |
| I have but a quick question for those that use this: Who would like the encumbrance percentage hidden as well? --{{User:Klexur/Signature}} 20:45, 30 July 2012 (BST)
| |
|
| |
|
| == Special Dumbwit Reports == | | == Special Dumbwit Reports == |
|
| |
| If anybody is watching, I would greatly appreciate it if I could get some Dumbwit reports of special locations in Malton. Places like map edges and corners especially. Reason being is that I use Dumbwit reports to test most of my scripts to reduce IP hits. --{{User:Klexur/Signature}} 20:31, 11 July 2012 (BST) | | If anybody is watching, I would greatly appreciate it if I could get some Dumbwit reports of special locations in Malton. Places like map edges and corners especially. Reason being is that I use Dumbwit reports to test most of my scripts to reduce IP hits. --{{User:Klexur/Signature}} 20:31, 11 July 2012 (BST) |
| :The only help I can offer is [http://www.google.com/search?hl=en&q=site:http://iamscott.net+Pritchard+Grove+Railway+Station this]. The other four corners had no relevant results. {{User:Aichon/Signature}} 21:38, 11 July 2012 (BST) | | :The only help I can offer is [http://www.google.com/search?hl=en&q=site:http://iamscott.net+Pritchard+Grove+Railway+Station this]. The other four corners had no relevant results. {{User:Aichon/Signature}} 21:38, 11 July 2012 (BST) |
Line 75: |
Line 22: |
|
| |
|
| == Content outside the page boundary == | | == Content outside the page boundary == |
|
| |
| Careful that your content doesn't exceed the designated areas and [http://wiki.urbandead.com/index.php?title=User:Klexur&curid=156339&diff=2013395&oldid=2013159 block stuff that should be visible], such as the difference between revisions in that link. I don't think anyone will really mind if it's just your userpage and most of the navigation is still intact, but you should try to avoid it if possible, since there is a policy against covering up stuff. {{User:Aichon/Signature}} 00:22, 21 July 2012 (BST) | | Careful that your content doesn't exceed the designated areas and [http://wiki.urbandead.com/index.php?title=User:Klexur&curid=156339&diff=2013395&oldid=2013159 block stuff that should be visible], such as the difference between revisions in that link. I don't think anyone will really mind if it's just your userpage and most of the navigation is still intact, but you should try to avoid it if possible, since there is a policy against covering up stuff. {{User:Aichon/Signature}} 00:22, 21 July 2012 (BST) |
| :Is it okay how it is now though? I've since changed the included templates so the linked page looks way wrong. --{{User:Klexur/Signature}} 00:26, 21 July 2012 (BST) | | :Is it okay how it is now though? I've since changed the included templates so the linked page looks way wrong. --{{User:Klexur/Signature}} 00:26, 21 July 2012 (BST) |
Line 84: |
Line 30: |
|
| |
|
| == borrowed code == | | == borrowed code == |
|
| |
| Hi, I saw your map tracking your own movements, and I tried applying the code for a tour I'm putting together. | | Hi, I saw your map tracking your own movements, and I tried applying the code for a tour I'm putting together. |
| The result is extremely basic and can be found [[User:Peralta/Workspace#Map-thingie_for_the_bartour|here]]. | | The result is extremely basic and can be found [[User:Peralta/Workspace#Map-thingie_for_the_bartour|here]]. |