Revision history
|
|
The NYT home page seems to seesaw between two main versions of its HTML, which I labeled NYTimes Layout2 and NYTimes Layout3. (See descriptions of earlier userscripts with these names.) Rather than continuing to seesaw between these two scripts, I placed a test at the front of the code to try to determine which layout it is encountering. Using the result, I branch to the latest complete script for each layout. When NYT's variations are fairly regular over time, as with Layout2 and Layout3, I can include a test for one condition or the other. When they introduce a new section of the page, as with Times Wire, I have to scramble. I would welcome advice on how to handle this better. I regret that all of this change is a little frustrating. The basic problem is that many blocks of NYT HTML have no ID, so I must identify them by their relative positions. When NYT changes that position, I must change the script. |