User:Incnis Mrsi/uncaption.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
![]() | Documentation for this user script can be added at User:Incnis Mrsi/uncaption. |
// makes edits related to Wikidata captions less visible
mw.hook( 'wikipage.content' ).add( function (dummy) {
var comments = document.getElementsByClassName( "autocomment" );
for (var i = 0, n = comments.length; i < n; i++) {
if ( comments[i].innerHTML.match(/\[\w+\].*:/) ) {
comments[i].parentNode.parentNode.parentNode.setAttribute('style', "margin-top:0.125ex; font-size:50%;");
}
}
} );