MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
$( function(){ | $( function(){ | ||
if( mw.config.get('wgUser') === null ){ | if( mw.config.get('wgUser') === null ){ | ||
Line 16: | Line 4: | ||
e.preventDefault(); | e.preventDefault(); | ||
}); | }); | ||
} | |||
}); | |||
$( function(){ | |||
var poemElement = $(".Poem2-Ekatra"); | |||
if( poemElement.length ){ | |||
var poemText = poemElement.html(); | |||
var poemArray = poemText.split("\n"); | |||
poemElement.text(""); | |||
poemArray.forEach( function(i) { | |||
poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' ); | |||
}); | |||
} | } | ||
}); | }); |
Revision as of 17:27, 6 June 2021
$( function(){
if( mw.config.get('wgUser') === null ){
$('body').bind('cut copy', function(e) {
e.preventDefault();
});
}
});
$( function(){
var poemElement = $(".Poem2-Ekatra");
if( poemElement.length ){
var poemText = poemElement.html();
var poemArray = poemText.split("\n");
poemElement.text("");
poemArray.forEach( function(i) {
poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' );
});
}
});