No, you can't center the text, because it shows in a standard alert.
You can make a custom alert, though, which allows normal HTML. Try this script (in the head of your page):
Code:
<script >
function disable_rc()
{
if(!document.getElementById('disable_rc')){document.body.innerHTML+="<div id='disable_rc' style=\'position:fixed;top:50%;left:50%;\'><\/div>"; }
document.getElementById('disable_rc').innerHTML='<div style="position: fixed; margin-left: -165px; margin-top: -25px;" ><div style="position: fixed; color: white; background: grey; cursor: pointer; padding-left: 2px; padding-right: 2px; font-family: verdana; font-size: 13px; font-weight: bold;z-index: 1; margin-top: 0px; margin-left: 320px" onclick="document.getElementById(\'disable_rc\').innerHTML=\'\'">X<\/div><\/div><br><iframe name="ifr" id="ifr" style="position: fixed;left: 50%; top: 50%;width:333px;margin-left: -165px;margin-top: -25px;height:50px;border: 1px solid silver" frameborder="0" onload="frames[\'ifr\'].document.body.innerHTML=\'<span style=" font-family: verdana; font-size: 12px; display: block; text-align: center;">Copyright name owner site. All rights reserved. <br>Please contact me for licensing information.</span>\'"></iframe>';return false;
}
if (document.addEventListener) {
document.addEventListener('contextmenu', function(e) {
disable_rc();
e.preventDefault();
}, false);
} else {
document.attachEvent('oncontextmenu', function() {
disable_rc();
window.event.returnValue = false;
});
}
</script>
Bookmarks