« first day (1056 days earlier)      last day (3937 days later) » 

5:50 PM
I'm sorry, this is going to be a complete noob question: I adjusted the excellent user script of Nathan to support some long wanted functionality.
When I'm looking at the code, I find things I don't understand. For instance he uses some obviously global variables like StackExchange.MarkdownEditor and I have absolutely no idea how I could have found this myself.
Is there any QA here about What you have to know when you want to write a user-script for an SE site?
(I'm fully aware, that it is quite likely, that my question does not make any sense)
 
Hm, no, not that I'm aware of. It mostly just comes from a familiarity with the Stack Exchange JavaScript code, which I for my part have as a result of meddling in bug reports on Meta.
That said, I suppose it might not hurt to write up something like that, although obviously the internals of the site are subject to change without warning.
 
@TimStone My development strategy currently is to
- write the code in IDEA and
- test it inside Chrome
while I'm using heavily the debug possibilities of Chrome.
Is there any simple way to make the process of how the site is loaded and built up more verbose to me?
Or to ask different: How could I find out about StackExchange.* when I hadn't it seen in the script?
 
Well, you can explore the various pieces of the StackExchange object using the inspector tools in Chrome, which can give you some insight about what's there. For actually knowing what everything does and how exactly you can use it, there's not a lot of options other than looking at the minified source code and trying to piece together what everything does.
Oh, I lied a little. You can actually view the unminified JavaScript from the dev site.
For example, the source code of full.js, which contains most of the site's functionality.
4
 
@TimStone This is useful, but how could I have found this myself?
(I only ask because I was reading through QA on apps.SE for the last hour)
 
No particular way. You just have to know, I suppose.
 
6:03 PM
@TimStone OK, I think I have enough to read/try for now. Thanks very much!
 
No problem! :)
 

« first day (1056 days earlier)      last day (3937 days later) »