User talk:The Transhumanist/ViewAnnotationToggler.js: Difference between revisions

Content deleted Content added
Line 67:
== Went from cloning/regex-to-null to show/hide wrapper ==
 
Initially, the program toggled hide/show in a rather convoluted way: first it saved the mw-content element by cloning it. Then it deleted the annotations using regex. To get them back, it made a clone of the clone, and then replaced mw-content with the second clone. Here's that version:
 
https://en.wikipedia.org/w/index.php?title=User:The_Transhumanist/anno.js&oldid=759842909
 
Then based on a suggestion by Anomie, I simplified the script to wrap each annotation in a classed span (class="anno"), and then used jQuery in the subfunctions to .hide and .show the class. [[UserHere's talk:Thethe Transhumanist|<i>The&nbsp;Transhumanist</i>]] 13simplification:24, 19 January 2017 (UTC)
 
https://en.wikipedia.org/w/index.php?title=User:The_Transhumanist/anno.js&oldid=760834841
 
 
It shrank by several lines of code. [[User talk:The Transhumanist|<i>The&nbsp;Transhumanist</i>]] 13:27, 19 January 2017 (UTC)
 
== Find/verify non-li list-lead entries ==