MediaWiki:Common.js: Difference between revisions

From Ekatra Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' );
poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' );
});
});
});
$( function(){
if( mw.config.get('wgUser') === null  ){
$('body').bind('cut copy', function(e) {
e.preventDefault();
});
}
});
});

Revision as of 17:23, 6 June 2021

$( function(){
	var poemElement = $(".Poem2-Ekatra");
	var poemText = poemElement.html();
	var poemArray = poemText.split("\n");
	
	poemElement.text("");

	poemArray.forEach( function(i) {
		poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' );
	});
});

$( function(){
	if( mw.config.get('wgUser') === null  ){
		$('body').bind('cut copy', function(e) {
			e.preventDefault();
		});	
	}
});