4 ms·
Disable jitter by running the following in console: require('forecast/jitter').get = function(){return 0;}
by susw 10y ago
Disable jitter by running the following in console:
require('forecast/jitter').get = function(){return 0;}
- the_duke 10y agoHaha, awesome find. Did you just dig through the code or are you a NYT dev?
- susw 10y agoDug through the code. Just inspected the element showing the number to get the class (.widget-info-display-cont) and searched through 'general-main.js' to find where the element is created. A timer that updates the value in the element is found ~100 lines further down.
- spacehacker 10y agoWhat does the require statement do?
- tedmiston 10y agoThat's how they load the module that does the jittering. So by assigning its .get() method to be a noop instead (return 0), it does nothing (besides pointlessly return zero) when attempting to load.
- farnsworth 10y agoIncrease the jitter amount with the following: require('forecast/jitter').get = function(){return Math.random()*10;}
- lucio 10y agoElection Time! require('forecast/jitter').get = function(){return new Date().getSeconds()-30;}