Difference between revisions of "MediaWiki:Gadget-rc-always-live.js"

From The Coppermind
Jump to navigation Jump to search
m (since it's working)
m (debugging deanon)
 
Line 1: Line 1:
mw.hook('structuredChangeFilters.ui.initialized').add(function () {
mw.hook('structuredChangeFilters.ui.initialized').add(function rc_always_live() {


//-console.debug('structuredChangeFilters.ui.initialized')
//-console.debug('structuredChangeFilters.ui.initialized')

Latest revision as of 19:26, 14 October 2019

mw.hook('structuredChangeFilters.ui.initialized').add(function rc_always_live() {

//-console.debug('structuredChangeFilters.ui.initialized')

const el = document.querySelector('.mw-rcfilters-ui-liveUpdateButtonWidget a')
if (el && !el.classList.contains('oo-ui-toggleWidget-on')) {
 console.debug('gadget:', 'rc-always-live.js')
 el.click()
}

})