169
edits
m (testing something) |
m (try some different js) |
||
Line 3: | Line 3: | ||
// Remove whitespace tags using JS. The CSS-based approach seems to work fine on Chromium-based browsers, but not very well on Firefox. | // Remove whitespace tags using JS. The CSS-based approach seems to work fine on Chromium-based browsers, but not very well on Firefox. | ||
window.onload = function() { | window.onload = function() { | ||
var paras = document.querySelectorAll('.mw-parser-output p'); | |||
var paras = document.querySelectorAll( | |||
for (var i = 0; i < paras.length; i++) { | for (var i = 0; i < paras.length; i++) { | ||
if ( | if (paras[i].childNodes[0].nodeName === 'BR') { | ||
paras[i]. | paras[i].remove(); | ||
} | } | ||
} | } | ||
} | } |