User talk:Guywan/Scripts/LEA.js

Suggestions
I have a few more suggestions, if you'll hear them. Feel free to ignore.
 * 1) Wrap the script in an anonymous function, to ensure that it doesn't accidentally interact with other code
 * 2) Put   at the top
 * 3) Put   at the bottom
 * 4) Wait for the page to be ready before adding the link
 * 5) Use   before the start of the main run function
 * 6) Add   at the end of that function
 * 7) Use
 * 8) Replace   with

If you want an example of how I write scripts, see User:DannyS712/Easy-link.js, which is fairly straightforward. --DannyS712 (talk) 17:44, 1 June 2019 (UTC)


 * Thank you, . You're suggestions are welcome.


 * 1) Very useful! I didn't know functions could be declared inside functions.
 * 2) To my knowledge,   and   are synonymous. See the jQuery docs.
 * 3) An excellent idea!
 * Guywan (talk) 18:05, 1 June 2019 (UTC)
 * Hi Guywan, I will definitely be trying out this script. I'll keep you posted.
 * By the way, I have trouble remembering all these programming details while working on scripts. I sometimes go weeks or months between coding sessions, and after each break I may find it difficult to understand anything I coded. So, I started writing "walk-throughs" of my code on the scripts' talk pages, explaining each script piece by piece, pulling in resources (links, excerpts, etc.) to help grok the code. Here are some entries that you might find useful to further illuminate the concepts presented above:
 * Concerning #1 above, I think a bodyguard function would also serve to remove the script from global scope into the local scope of the current script, while reserving aliases for use in the script. For more information, see User talk:The Transhumanist/SearchSuite.js.


 * For #2 (waiting) above, see User talk:The Transhumanist/SearchSuite.js
 * For #3 (portletlink) above, see User talk:The Transhumanist/SearchSuite.js
 * I haven't tried out your script yet, but will do so soon. Got to go!  &mdash; The Transhumanist   04:57, 6 June 2019 (UTC)

Testing, testing...
I'm very excited that you created this script, and can't wait until I learn how to use it correctly. At the moment, I don't know how to make it work or what it can work on. I went to Outline of baseball, clicked on List Entry Annotator, and the page hung with the menu still hanging down. Nothing else happened, as far as I could tell. &mdash; The Transhumanist  07:43, 6 June 2019 (UTC)


 * For large pages like Outline of baseball, this script will take a very long time to complete, and will appear to hang. My browser (Chrome) even told me (a few times) that the page was unresponsive. Just wait, eventually the script will complete (~30 seconds for me). I don't think there is any way to speed up the script, without changing the way it works. You might want to try the script in your sandbox to get the hang of it. GUYWAN ( t &middot; c ) 10:41, 6 June 2019 (UTC)
 * Thank you. I'll try it again, and will get back to you with comments.  &mdash; The Transhumanist   12:23, 10 June 2019 (UTC)