MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1,382: | Line 1,382: | ||
var authorBlock = section.children('p').filter(function () { | var authorBlock = section.children('p').filter(function () { | ||
return $(this).find('span[style*="float:right"]').length; | |||
}).first(); | |||
return | if (!authorBlock.length) { | ||
return; | |||
} | |||
// Hide immediately | |||
authorBlock.addClass('author-hidden'); | |||
setTimeout(function () { | |||
var poemBlock = section.children('.Poem2-Ekatra').first(); | |||
if (poemBlock.length) { | |||
poemBlock.after(authorBlock); | |||
// Show after moving | |||
authorBlock.removeClass('author-hidden'); | |||
console.log('Author block moved'); | |||
} | |||
} | }, 100); | ||
}); | }); | ||